pub enum SnappyError {
UnexpectedEof {
context: &'static str,
},
InvalidLength {
length: usize,
max_length: usize,
},
InvalidTag {
tag: u8,
offset: usize,
},
InvalidOffset {
offset: usize,
position: usize,
},
OutputLengthMismatch {
expected: usize,
actual: usize,
},
ChecksumMismatch {
expected: u32,
computed: u32,
},
InvalidChunkType {
chunk_type: u8,
},
InvalidStreamIdentifier,
CorruptedData {
message: String,
},
Io(Error),
}Expand description
Error type for Snappy operations.
Variants§
UnexpectedEof
The input data is too short or truncated.
InvalidLength
The decompressed length header is invalid or too large.
InvalidTag
An invalid tag byte was encountered during decompression.
InvalidOffset
A copy operation references data before the start of the output.
OutputLengthMismatch
The decompressed output does not match the expected length.
Fields
ChecksumMismatch
CRC32C checksum mismatch in framed format.
Fields
InvalidChunkType
Invalid or unrecognized chunk type in framed format.
InvalidStreamIdentifier
The stream identifier is missing or invalid.
CorruptedData
The compressed data is corrupted.
Io(Error)
An I/O error occurred.
Trait Implementations§
Source§impl Debug for SnappyError
impl Debug for SnappyError
Source§impl Display for SnappyError
impl Display for SnappyError
Source§impl Error for SnappyError
impl Error for SnappyError
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<Error> for SnappyError
impl From<Error> for SnappyError
Source§impl From<SnappyError> for Error
impl From<SnappyError> for Error
Source§fn from(err: SnappyError) -> Self
fn from(err: SnappyError) -> Self
Converts to this type from the input type.
Source§impl From<SnappyError> for OxiArcError
impl From<SnappyError> for OxiArcError
Source§fn from(err: SnappyError) -> Self
fn from(err: SnappyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SnappyError
impl !UnwindSafe for SnappyError
impl Freeze for SnappyError
impl Send for SnappyError
impl Sync for SnappyError
impl Unpin for SnappyError
impl UnsafeUnpin for SnappyError
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