pub enum DvplError {
TooSmall(usize),
BadMagic([u8; 4]),
SizeMismatch {
expected: usize,
actual: usize,
},
CrcMismatch {
expected: u32,
actual: u32,
},
DecompressedSizeMismatch {
expected: usize,
actual: usize,
},
UnknownCompression(u32),
Lz4(String),
}Expand description
Variants§
TooSmall(usize)
Input shorter than 20 bytes (footer size).
BadMagic([u8; 4])
Footer magic does not match b"DVPL".
SizeMismatch
Payload length disagrees with the compressed_size field in the footer.
CrcMismatch
CRC32 of the payload does not match the checksum in the footer.
DecompressedSizeMismatch
Decompressed output length disagrees with the original_size field.
UnknownCompression(u32)
Footer contains an unrecognized compression type value.
Lz4(String)
Upstream lz4 crate returned an error during compress/decompress.
Trait Implementations§
Source§impl Error for DvplError
impl Error for DvplError
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()
Auto Trait Implementations§
impl Freeze for DvplError
impl RefUnwindSafe for DvplError
impl Send for DvplError
impl Sync for DvplError
impl Unpin for DvplError
impl UnsafeUnpin for DvplError
impl UnwindSafe for DvplError
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