pub enum Error {
Format(FormatError),
Unsupported(UnsupportedError),
Encoding(DecodingError),
IO(Error),
Decompression {
method: Method,
msg: String,
},
UnknownSize,
}
Expand description
Any zip-related error, from invalid archives to encoding problems.
Variants§
Format(FormatError)
Not a valid zip file, or a variant that is unsupported.
Unsupported(UnsupportedError)
Something is not supported by this crate
Encoding(DecodingError)
Invalid UTF-8, Shift-JIS, or any problem encountered while decoding text in general.
IO(Error)
I/O-related error
Decompression
Decompression-related error
UnknownSize
Could not read as a zip because size could not be determined
Implementations§
source§impl Error
impl Error
sourcepub fn method_not_supported(method: Method) -> Self
pub fn method_not_supported(method: Method) -> Self
Create a new error indicating that the given method is not supported.
sourcepub fn method_not_enabled(method: Method) -> Self
pub fn method_not_enabled(method: Method) -> Self
Create a new error indicating that the given method is not enabled.
Trait Implementations§
source§impl Error for Error
impl Error for Error
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<DecodingError> for Error
impl From<DecodingError> for Error
source§fn from(source: DecodingError) -> Self
fn from(source: DecodingError) -> Self
Converts to this type from the input type.
source§impl From<FormatError> for Error
impl From<FormatError> for Error
source§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
source§impl From<UnsupportedError> for Error
impl From<UnsupportedError> for Error
source§fn from(source: UnsupportedError) -> Self
fn from(source: UnsupportedError) -> Self
Converts to this type from the input type.
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§
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