#[non_exhaustive]pub enum ZlibErrorKind {
UnsupportedCompressionMethod(u8),
UnsupportedWindowSize(u8),
BadHeaderCheck,
PresetDictionary,
Truncated,
ChecksumMismatch {
expected: u32,
actual: u32,
},
TrailingGarbage,
}Expand description
The reason an RFC 1950 zlib container was rejected.
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.
UnsupportedCompressionMethod(u8)
The header selected a compression method other than DEFLATE.
UnsupportedWindowSize(u8)
CINFO requested a window larger than DEFLATE’s 32 KiB maximum.
BadHeaderCheck
The CMF/FLG pair did not satisfy the FCHECK residue.
PresetDictionary
Preset dictionaries are not supported by this decoder.
Truncated
The zlib header or Adler-32 trailer was truncated.
ChecksumMismatch
The Adler-32 stored in the trailer did not match the output.
TrailingGarbage
Bytes remained after the one complete zlib stream.
Trait Implementations§
Source§impl Clone for ZlibErrorKind
impl Clone for ZlibErrorKind
Source§fn clone(&self) -> ZlibErrorKind
fn clone(&self) -> ZlibErrorKind
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 ZlibErrorKind
impl Debug for ZlibErrorKind
Source§impl Display for ZlibErrorKind
impl Display for ZlibErrorKind
impl Eq for ZlibErrorKind
Source§impl PartialEq for ZlibErrorKind
impl PartialEq for ZlibErrorKind
impl StructuralPartialEq for ZlibErrorKind
Auto Trait Implementations§
impl Freeze for ZlibErrorKind
impl RefUnwindSafe for ZlibErrorKind
impl Send for ZlibErrorKind
impl Sync for ZlibErrorKind
impl Unpin for ZlibErrorKind
impl UnsafeUnpin for ZlibErrorKind
impl UnwindSafe for ZlibErrorKind
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