pub enum RefPackError {
EmptyInput,
BadFlags(u8),
BadMagic(u8),
ControlError {
error: DecodeError,
position: usize,
},
Io(Error),
}Expand description
Possible errors returned by compression and decompression functions
Variants§
EmptyInput
Error for when no input is provided to a compressor function
BadFlags(u8)
Error that occurs when a flag was set in the header flags that is not supported
§Fields
- u8: What was read instead of the expected flags
BadMagic(u8)
Error indicating that the header failed to read the magic where it expected it. Location depends on the exact implementation.
§Fields
- u8: What was read instead of the magic value
ControlError
Indicates that an invalid operation occurred while attempting to decode a control. This normally indicates invalid or corrupted data.
See DecodeError for further details on types of errors that can occur.
Io(Error)
Generic IO Error wrapper for when a generic IO error of some sort occurs in relation to the readers and writers.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0§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§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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more