pub enum DecmpfsError {
Truncated,
BadMagic(u32),
UnknownType(u32),
Unsupported(&'static str),
MissingResourceFork,
OutOfBounds,
Codec(&'static str),
LengthMismatch {
expected: usize,
got: usize,
},
}Expand description
A decmpfs decode failure. Every arm fails loud — decmpfs never degrades to silent wrong output (a half-decoded file is worse than a named error).
Variants§
Truncated
The xattr is shorter than the 16-byte header.
BadMagic(u32)
The header magic was not cmpf.
UnknownType(u32)
compression_type is not a documented value.
Unsupported(&'static str)
A documented but unsupported type (LZBitmap — no public spec; or the de-dup generation store, type 5, which has no payload here).
MissingResourceFork
An even (resource-fork) type was seen but no resource fork was supplied.
OutOfBounds
A length/offset field pointed outside the available bytes.
Codec(&'static str)
The underlying codec rejected the stream.
LengthMismatch
The decoded output length did not match the header’s uncompressed_size.
Trait Implementations§
Source§impl Clone for DecmpfsError
impl Clone for DecmpfsError
Source§fn clone(&self) -> DecmpfsError
fn clone(&self) -> DecmpfsError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecmpfsError
impl Debug for DecmpfsError
Source§impl Display for DecmpfsError
impl Display for DecmpfsError
impl Eq for DecmpfsError
Source§impl Error for DecmpfsError
impl Error for DecmpfsError
1.30.0 · 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 PartialEq for DecmpfsError
impl PartialEq for DecmpfsError
Source§fn eq(&self, other: &DecmpfsError) -> bool
fn eq(&self, other: &DecmpfsError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DecmpfsError
Auto Trait Implementations§
impl Freeze for DecmpfsError
impl RefUnwindSafe for DecmpfsError
impl Send for DecmpfsError
impl Sync for DecmpfsError
impl Unpin for DecmpfsError
impl UnsafeUnpin for DecmpfsError
impl UnwindSafe for DecmpfsError
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