pub struct EncodedEnvelope<T> { /* private fields */ }Expand description
One encoding and the envelope derived from those exact bytes.
Only codecs construct this pair. Neither half can be changed in place.
Readers retain just VerifiedEnvelope, without a second copy of the bytes.
Implementations§
Source§impl<T> EncodedEnvelope<T>
impl<T> EncodedEnvelope<T>
Sourcepub fn document_len(&self) -> usize
pub fn document_len(&self) -> usize
Returns the document length before any compression.
Sourcepub fn envelope(&self) -> &VerifiedEnvelope<T>
pub fn envelope(&self) -> &VerifiedEnvelope<T>
Envelope derived while encoding, without decoding or serializing again.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Takes the complete durable document.
Sourcepub fn into_envelope(self) -> VerifiedEnvelope<T>
pub fn into_envelope(self) -> VerifiedEnvelope<T>
Discards the encoding and retains its verified envelope.
Sourcepub fn into_parts(self) -> (VerifiedEnvelope<T>, Vec<u8>)
pub fn into_parts(self) -> (VerifiedEnvelope<T>, Vec<u8>)
Separates the immutable envelope and its bytes for storage publication.
Trait Implementations§
Source§impl<T: Clone> Clone for EncodedEnvelope<T>
impl<T: Clone> Clone for EncodedEnvelope<T>
Source§impl<T: Debug> Debug for EncodedEnvelope<T>
impl<T: Debug> Debug for EncodedEnvelope<T>
impl<T: Eq> Eq for EncodedEnvelope<T>
Source§impl<T: PartialEq> PartialEq for EncodedEnvelope<T>
impl<T: PartialEq> PartialEq for EncodedEnvelope<T>
impl<T: PartialEq> StructuralPartialEq for EncodedEnvelope<T>
Auto Trait Implementations§
impl<T> Freeze for EncodedEnvelope<T>where
VerifiedEnvelope<T>: Freeze,
impl<T> RefUnwindSafe for EncodedEnvelope<T>where
VerifiedEnvelope<T>: RefUnwindSafe,
impl<T> Send for EncodedEnvelope<T>where
VerifiedEnvelope<T>: Send,
impl<T> Sync for EncodedEnvelope<T>where
VerifiedEnvelope<T>: Sync,
impl<T> Unpin for EncodedEnvelope<T>where
VerifiedEnvelope<T>: Unpin,
impl<T> UnsafeUnpin for EncodedEnvelope<T>where
VerifiedEnvelope<T>: UnsafeUnpin,
impl<T> UnwindSafe for EncodedEnvelope<T>where
VerifiedEnvelope<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