pub struct VerifiedEnvelope<T> { /* private fields */ }Expand description
An envelope whose framing was verified on read or derived on write.
Payload access is read-only: changing a payload requires a new encoding. Family codecs apply their own kind, version, and payload validation rules. Kind and version are checked at the codec boundary, not retained as caller state. This type has no serde decoder; durable reads must use a checked codec.
Implementations§
Source§impl<T> VerifiedEnvelope<T>
impl<T> VerifiedEnvelope<T>
Sourcepub fn payload_checksum(&self) -> &str
pub fn payload_checksum(&self) -> &str
Checksum of the exact stored payload bytes.
Sourcepub fn payload(&self) -> &T
pub fn payload(&self) -> &T
Payload protected by this framing. Clone it to prepare a changed successor.
Sourcepub fn into_payload(self) -> T
pub fn into_payload(self) -> T
Takes the payload out of its verified framing for reuse or modification.
Trait Implementations§
Source§impl<T: Clone> Clone for VerifiedEnvelope<T>
impl<T: Clone> Clone for VerifiedEnvelope<T>
Source§impl<T: Debug> Debug for VerifiedEnvelope<T>
impl<T: Debug> Debug for VerifiedEnvelope<T>
impl<T: Eq> Eq for VerifiedEnvelope<T>
Source§impl<T: PartialEq> PartialEq for VerifiedEnvelope<T>
impl<T: PartialEq> PartialEq for VerifiedEnvelope<T>
impl<T: PartialEq> StructuralPartialEq for VerifiedEnvelope<T>
Auto Trait Implementations§
impl<T> Freeze for VerifiedEnvelope<T>where
T: Freeze,
impl<T> RefUnwindSafe for VerifiedEnvelope<T>where
T: RefUnwindSafe,
impl<T> Send for VerifiedEnvelope<T>where
T: Send,
impl<T> Sync for VerifiedEnvelope<T>where
T: Sync,
impl<T> Unpin for VerifiedEnvelope<T>where
T: Unpin,
impl<T> UnsafeUnpin for VerifiedEnvelope<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for VerifiedEnvelope<T>where
T: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more