pub struct ContainerFrame<'a> { /* private fields */ }Expand description
Borrowed view over a .lnmp container.
Implementations§
Source§impl<'a> ContainerFrame<'a>
impl<'a> ContainerFrame<'a>
Sourcepub fn parse(bytes: &'a [u8]) -> Result<Self, ContainerFrameError>
pub fn parse(bytes: &'a [u8]) -> Result<Self, ContainerFrameError>
Parses a .lnmp container from raw bytes.
Sourcepub const fn header(&self) -> LnmpContainerHeader
pub const fn header(&self) -> LnmpContainerHeader
Header describing this container.
Sourcepub fn delta_apply_context(&self) -> Option<DeltaApplyContext>
pub fn delta_apply_context(&self) -> Option<DeltaApplyContext>
Builds a delta apply context from the metadata (if mode is Delta).
Sourcepub fn body(&self) -> ContainerBody<'a>
pub fn body(&self) -> ContainerBody<'a>
Returns a typed view over the payload bytes.
Sourcepub fn decode_record(&self) -> Result<LnmpRecord, ContainerDecodeError>
pub fn decode_record(&self) -> Result<LnmpRecord, ContainerDecodeError>
Decodes the payload into a LnmpRecord using mode-specific codecs.
Sourcepub fn stream_metadata(&self) -> Option<Result<StreamMetadata, MetadataError>>
pub fn stream_metadata(&self) -> Option<Result<StreamMetadata, MetadataError>>
Parses stream metadata if present (mode 0x03).
Sourcepub fn delta_metadata(&self) -> Option<Result<DeltaMetadata, MetadataError>>
pub fn delta_metadata(&self) -> Option<Result<DeltaMetadata, MetadataError>>
Parses delta metadata if present (mode 0x04).
Sourcepub fn decode_to_text(&self) -> Result<String, ContainerDecodeError>
pub fn decode_to_text(&self) -> Result<String, ContainerDecodeError>
Canonicalizes the payload into LNMP text using Encoder.
Trait Implementations§
Source§impl<'a> Clone for ContainerFrame<'a>
impl<'a> Clone for ContainerFrame<'a>
Source§fn clone(&self) -> ContainerFrame<'a>
fn clone(&self) -> ContainerFrame<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ContainerFrame<'a>
impl<'a> Debug for ContainerFrame<'a>
impl<'a> Copy for ContainerFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContainerFrame<'a>
impl<'a> RefUnwindSafe for ContainerFrame<'a>
impl<'a> Send for ContainerFrame<'a>
impl<'a> Sync for ContainerFrame<'a>
impl<'a> Unpin for ContainerFrame<'a>
impl<'a> UnwindSafe for ContainerFrame<'a>
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