File tree Expand file tree Collapse file tree
eql/crates/eql-bindings/src/v4 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -514,10 +514,13 @@ impl EncryptFrom<Value> for JsonTreeDocument {
514514 }
515515}
516516
517- /// Opens to the plaintext document, under the stored identifier. A caller
518- /// that passes the column it expects, as a `NonEmpty<Identifier>`, has the
519- /// stored identifier checked against it before any key is requested. A
520- /// caller that passes nothing opens under the stored identifier unchecked.
517+ /// Decrypts to the plaintext document, under the stored identifier.
518+ ///
519+ /// - If you pass the column you expect, as a `NonEmpty<Identifier>`, the
520+ /// stored identifier must equal it. The check runs before any key is
521+ /// requested.
522+ /// - If you pass nothing, the document decrypts under the stored
523+ /// identifier, without that check.
521524impl DecryptInto < Value > for JsonTreeDocument {
522525 type Context = ExpectedContext < Identifier > ;
523526 fn decryption < K : ' static > ( self , context : Self :: Context ) -> Decryption < Value , K > {
Original file line number Diff line number Diff line change @@ -861,10 +861,11 @@ impl DeclaredContext {
861861/// descriptor is HMAC'd into the tag, so altering a stored identifier makes
862862/// the retrieve fail rather than succeed, and nobody reaches a key they are
863863/// not entitled to. See ADR-0004.
864- // Hidden here, on the definition, and not only on the re-export. rustc
865- // reads this attribute when it lists the types that implement a trait in a
866- // compile error, and rustdoc reads it when another crate's docs name the
867- // type. On the re-export alone, the type still showed in both.
864+ // `#[doc(hidden)]` must be on this definition, and not only on the
865+ // re-export. rustc reads the attribute here when a compile error lists the
866+ // types that implement a trait. rustdoc reads it here when the docs of
867+ // another crate name the type. With the attribute on the re-export alone,
868+ // both still showed the type.
868869#[ doc( hidden) ]
869870#[ derive( Clone , Debug ) ]
870871pub struct ExpectedContext < T > ( Option < NonEmpty < T > > ) ;
Original file line number Diff line number Diff line change @@ -184,10 +184,12 @@ pub mod transcode;
184184mod tuples;
185185
186186pub ( crate ) use self :: core:: { bind_pending, seal_pending} ;
187- /// The check a `#[stash(context_field)]` record runs on decrypt. It is not
188- /// part of the API: the derives and the EQL types name it, and a caller
189- /// passes a `NonEmpty<T>` or nothing. It is public only so that code the
190- /// derives emit in another crate can name it. The definition is hidden too.
187+ /// The check that a `#[stash(context_field)]` record runs on decrypt.
188+ ///
189+ /// `ExpectedContext` is not part of the API. Only the derives and the EQL
190+ /// types name it, and a caller passes a `NonEmpty<T>` or nothing. The type
191+ /// is public only because the derives emit code in other crates that
192+ /// names it. The definition is hidden too.
191193#[ doc( hidden) ]
192194pub use context:: ExpectedContext ;
193195pub use context:: {
Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ pub trait EncryptFrom<S>: Sized + 'static {
6666/// ciphertext and its context, and [`open`] describes the rest. A query-only
6767/// target (terms alone) has no implementation.
6868pub trait DecryptInto < P > : Sized {
69- /// What a caller supplies to open the target. A record that stores its
70- /// context converts from `()` or from the `NonEmpty<T>` the caller
71- /// believes it is opening .
69+ /// The context that a caller passes to decrypt the target. For a
70+ /// record that stores its context, the caller passes `()`, or the
71+ /// `NonEmpty<T>` that the caller expects the record to store .
7272 type Context ;
7373 /// The description the cipher executes to recover `P`.
7474 fn decryption < K : ' static > ( self , context : Self :: Context ) -> Decryption < P , K > ;
You can’t perform that action at this time.
0 commit comments