pub struct Sealed {
pub v: u8,
pub envelope: Envelope,
}Expand description
A versioned confidentiality envelope (ADR-020 §4).
Today every Sealed is v0 passthrough: it wraps a signed Envelope
(integrity + freshness) and is not encrypted. The version is the single
source of truth — open selects its construction from it and
confidentiality reads the level from it.
Fields§
§v: u8Wire version — selects the open construction and the confidentiality level.
envelope: EnvelopeThe signed envelope. For v0 it carries the cleartext payload (signed, not encrypted); for v1 it will authenticate the AEAD ciphertext.
Implementations§
Source§impl Sealed
impl Sealed
Sourcepub fn passthrough(envelope: Envelope) -> Sealed
pub fn passthrough(envelope: Envelope) -> Sealed
Wrap a signed Envelope as a v0 passthrough Sealed (signed, not
encrypted).
Sourcepub fn confidentiality(&self) -> Confidentiality
pub fn confidentiality(&self) -> Confidentiality
The type-level confidentiality (ADR-020 §4), read from the version. Unknown
versions conservatively read as Confidentiality::None — never claim a
secrecy this verifier can’t provide (and open rejects unknown versions
anyway).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sealed
impl<'de> Deserialize<'de> for Sealed
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Sealed, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Sealed, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Sealed
Source§impl Serialize for Sealed
impl Serialize for Sealed
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Sealed
Auto Trait Implementations§
impl Freeze for Sealed
impl RefUnwindSafe for Sealed
impl Send for Sealed
impl Sync for Sealed
impl Unpin for Sealed
impl UnsafeUnpin for Sealed
impl UnwindSafe for Sealed
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more