Enum zip_extract::ZipError
source · [−]pub enum ZipError {
Io(Error),
InvalidArchive(&'static str),
UnsupportedArchive(&'static str),
FileNotFound,
}
Expand description
Re-export of zip’s error type, for convenience.
Error type for Zip
Variants
Io(Error)
An Error caused by I/O
InvalidArchive(&'static str)
This file is probably not a zip archive
UnsupportedArchive(&'static str)
This archive is not supported
FileNotFound
The requested file could not be found in the archive
Implementations
Re-export of zip’s error type, for convenience.
The text used as an error when a password is required and not supplied
match archive.by_index(1) {
Err(ZipError::UnsupportedArchive(ZipError::PASSWORD_REQUIRED)) => eprintln!("a password is needed to unzip this file"),
_ => (),
}