[−][src]Enum snap::Error
Error describes all the possible errors that may occur during Snappy compression or decompression.
Note that it's unlikely that you'll need to care about the specific error
reported since all of them indicate a corrupt Snappy data or a limitation
that cannot be worked around. Therefore,
From<snap::Error> for std::io::Error is provided so that any Snappy
errors will be converted to a std::io::Error automatically when using
try!.
Variants
TooBigThis error occurs when the given input is too big. This can happen during compression or decompression.
Fields of TooBig
BufferTooSmallThis error occurs when the given buffer is too small to contain the maximum possible compressed bytes or the total number of decompressed bytes.
Fields of BufferTooSmall
EmptyThis error occurs when trying to decompress a zero length buffer.
HeaderThis error occurs when an invalid header is found during decompression.
HeaderMismatchThis error occurs when there is a mismatch between the number of decompressed bytes reported in the header and the number of actual decompressed bytes. In this error case, the number of actual decompressed bytes is always less than the number reported in the header.
Fields of HeaderMismatch
LiteralThis error occurs during decompression when there was a problem reading a literal.
Fields of Literal
CopyReadThis error occurs during decompression when there was a problem reading a copy.
Fields of CopyRead
CopyWriteThis error occurs during decompression when there was a problem writing a copy to the decompression buffer.
Fields of CopyWrite
OffsetThis error occurs during decompression when an invalid copy offset is found. An offset is invalid if it is zero or if it is out of bounds.
Fields of Offset
StreamHeaderThis error occurs when a stream header chunk type was expected but got a different chunk type. This error only occurs when reading a Snappy frame formatted stream.
Fields of StreamHeader
byte: u8The chunk type byte that was read.
StreamHeaderMismatchThis error occurs when the magic stream headers bytes do not match what is expected. This error only occurs when reading a Snappy frame formatted stream.
Fields of StreamHeaderMismatch
UnsupportedChunkTypeThis error occurs when an unsupported chunk type is seen. This error only occurs when reading a Snappy frame formatted stream.
Fields of UnsupportedChunkType
byte: u8The chunk type byte that was read.
UnsupportedChunkLengthThis error occurs when trying to read a chunk with length greater than that supported by this library when reading a Snappy frame formatted stream. This error only occurs when reading a Snappy frame formatted stream.
Fields of UnsupportedChunkLength
ChecksumThis error occurs when a checksum validity check fails. This error only occurs when reading a Snappy frame formatted stream.
Fields of Checksum
Trait Implementations
impl PartialEq<Error> for Error[src]
This implementation of PartialEq returns false when comparing two
errors whose underlying type is std::io::Error.
fn eq(&self, other: &Error) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl From<Error> for Error[src]
impl Eq for Error[src]
impl Debug for Error[src]
impl Display for Error[src]
impl Error for Error[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,