pub enum Error {
TruncatedInput {
position: usize,
},
InvalidOpcode {
position: usize,
opcode: u8,
},
InvalidMatchDistance {
distance: usize,
available: usize,
},
OutputTooSmall {
written: usize,
capacity: usize,
},
SizeMismatch {
expected: usize,
actual: usize,
},
TrailingData {
remaining: usize,
},
UnsupportedBlockMagic {
magic: u32,
},
InvalidDecmpfsMagic {
magic: u32,
},
UnsupportedDecmpfsCompressionType {
compression_type: u32,
},
MissingResourceFork,
InvalidResourceFork {
reason: &'static str,
},
SizeOverflow {
value: usize,
max: usize,
what: &'static str,
},
}Expand description
Errors produced while encoding or decoding raw LZVN streams and Apple
wrappers such as bvxn and decmpfs.
Variants§
TruncatedInput
The input ended before a full instruction or end marker was available.
InvalidOpcode
The decoder found an opcode that is reserved or undefined.
InvalidMatchDistance
A match referred to bytes that do not exist in the decoded history.
Fields
OutputTooSmall
The output buffer cannot hold the decoded bytes.
Fields
SizeMismatch
The decoded byte count does not match the caller’s expectation.
TrailingData
Data remains after a successful end-of-stream marker.
UnsupportedBlockMagic
The Apple block header is well-formed but not a bvxn block.
InvalidDecmpfsMagic
The decmpfs xattr header is well-formed but does not have the expected magic value.
UnsupportedDecmpfsCompressionType
The decmpfs wrapper uses a compression type this crate does not support.
MissingResourceFork
The decmpfs wrapper requires a resource fork but none was provided.
InvalidResourceFork
The decmpfs resource fork layout is malformed.
SizeOverflow
A size does not fit inside the target container format.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()