#[non_exhaustive]pub enum CompressionErrorKind {
UnknownCodec(i16),
CodecDisabled,
EncodeFailed {
message: String,
},
DecodeFailed {
message: String,
},
DecompressedTooLarge {
limit: usize,
},
}Expand description
Specific reason a compression operation failed.
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.
UnknownCodec(i16)
attributes bits 0–2 produced a value not in 0..=4.
CodecDisabled
Codec is recognised but its Cargo feature is not enabled.
EncodeFailed
Encoding (compress) failed in the underlying codec.
DecodeFailed
Decoding (decompress) failed in the underlying codec.
DecompressedTooLarge
Decompressed output exceeded the safety limit — the payload is treated as a decompression bomb rather than allowed to exhaust memory.
Trait Implementations§
Source§impl Debug for CompressionErrorKind
impl Debug for CompressionErrorKind
Source§impl Display for CompressionErrorKind
impl Display for CompressionErrorKind
Source§impl Error for CompressionErrorKind
impl Error for CompressionErrorKind
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 CompressionErrorKind
impl RefUnwindSafe for CompressionErrorKind
impl Send for CompressionErrorKind
impl Sync for CompressionErrorKind
impl Unpin for CompressionErrorKind
impl UnsafeUnpin for CompressionErrorKind
impl UnwindSafe for CompressionErrorKind
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