pub enum ContainerFrameError {
Header(LnmpContainerError),
ReservedFlags(u16),
InvalidMetadataLength {
mode: LnmpFileMode,
expected: usize,
actual: usize,
},
TruncatedMetadata {
expected: u32,
available: usize,
},
MetadataLengthOverflow(u32),
InvalidMetadataValue {
mode: LnmpFileMode,
field: &'static str,
value: u8,
},
}Expand description
Errors that can surface while parsing a .lnmp container frame.
Variants§
Header(LnmpContainerError)
Header level validation failed.
ReservedFlags(u16)
Reserved flags were set in a v1 container.
InvalidMetadataLength
Metadata length does not satisfy mode requirements.
Fields
§
mode: LnmpFileModeMode specified in the header.
TruncatedMetadata
Metadata length exceeded available bytes.
Fields
MetadataLengthOverflow(u32)
Metadata length cannot be represented on this platform.
InvalidMetadataValue
Metadata field contains a value that is not allowed for this mode.
Trait Implementations§
Source§impl Debug for ContainerFrameError
impl Debug for ContainerFrameError
Source§impl Display for ContainerFrameError
impl Display for ContainerFrameError
Source§impl Error for ContainerFrameError
impl Error for ContainerFrameError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ContainerFrameError> for ContainerDecodeError
impl From<ContainerFrameError> for ContainerDecodeError
Source§fn from(value: ContainerFrameError) -> Self
fn from(value: ContainerFrameError) -> Self
Converts to this type from the input type.
Source§impl From<LnmpContainerError> for ContainerFrameError
impl From<LnmpContainerError> for ContainerFrameError
Source§fn from(value: LnmpContainerError) -> Self
fn from(value: LnmpContainerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ContainerFrameError
impl RefUnwindSafe for ContainerFrameError
impl Send for ContainerFrameError
impl Sync for ContainerFrameError
impl Unpin for ContainerFrameError
impl UnwindSafe for ContainerFrameError
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