pub enum ZipCoreError {
Io(Error),
Format(FormatError),
UnsupportedMethod(CompressionMethod),
CrcMismatch {
entry: String,
expected: u32,
actual: u32,
},
EncryptedNoPassword(String),
WrongPassword(String),
UnsupportedEncryption {
entry: String,
reason: String,
},
EntryNotFound(String),
IndexOutOfBounds(usize),
SpannedArchive {
entry: String,
disk: u32,
},
Malformed {
entry: String,
reason: String,
},
}Expand description
Errors from opening or reading a ZIP entry.
Variants§
Io(Error)
An I/O error occurred.
Format(FormatError)
The container structure was malformed.
UnsupportedMethod(CompressionMethod)
An entry uses a compression method this reader does not (yet) decode.
CrcMismatch
The decoded entry’s CRC-32 did not match the central-directory value.
Fields
EncryptedNoPassword(String)
The entry is encrypted but no password was supplied (use by_*_decrypt).
WrongPassword(String)
The supplied password failed the entry’s verification check.
UnsupportedEncryption
An encrypted entry uses a scheme/parameters this reader cannot handle.
EntryNotFound(String)
No entry with the requested name exists.
IndexOutOfBounds(usize)
The requested entry index is out of range.
SpannedArchive
The entry’s data lives on another disk of a spanned/split archive, which this reader does not reassemble.
Malformed
The entry’s deflate stream was malformed (e.g. LEN/NLEN mismatch).
Trait Implementations§
Source§impl Debug for ZipCoreError
impl Debug for ZipCoreError
Source§impl Display for ZipCoreError
impl Display for ZipCoreError
Source§impl Error for ZipCoreError
impl Error for ZipCoreError
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<Error> for ZipCoreError
impl From<Error> for ZipCoreError
Source§impl From<FormatError> for ZipCoreError
impl From<FormatError> for ZipCoreError
Source§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ZipCoreError
impl !UnwindSafe for ZipCoreError
impl Freeze for ZipCoreError
impl Send for ZipCoreError
impl Sync for ZipCoreError
impl Unpin for ZipCoreError
impl UnsafeUnpin for ZipCoreError
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