#[non_exhaustive]pub enum MalformedInput {
FrameHeader(ReadFrameHeaderError),
Window(FrameHeaderError),
BlockHeader(BlockHeaderReadError),
BlockTooLarge {
size: usize,
maximum: usize,
},
Block(DecodeBlockContentError),
ContentSize {
declared: u64,
produced: u64,
},
Checksum {
expected: u32,
calculated: u32,
},
}Available on crate feature
caller-workspace only.Expand description
How the input breaks the zstd format.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FrameHeader(ReadFrameHeaderError)
A frame header, or the magic number before it, is invalid.
Window(FrameHeaderError)
The frame header declares an invalid window.
BlockHeader(BlockHeaderReadError)
A block header is invalid.
BlockTooLarge
A block states a size above its frame’s block maximum (RFC 8878 3.1.1.2.4).
Block(DecodeBlockContentError)
A block’s content does not decode.
ContentSize
The frame’s blocks do not add up to its declared content size.
Fields
Checksum
The content checksum does not match the decoded output.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MalformedInput
impl !UnwindSafe for MalformedInput
impl Freeze for MalformedInput
impl Send for MalformedInput
impl Sync for MalformedInput
impl Unpin for MalformedInput
impl UnsafeUnpin for MalformedInput
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