1
2
3
4
5
6
7
8
9
10
11
12
13
/// Extended `std::io::Error` for ZIP archive
#[derive(thiserror::Error, Debug)]
pub enum ZipReadError {
    /// See `std::io::Error`
    #[error(transparent)]
    IOError(#[from] std::io::Error),
    /// An error due to invalid ZIP arvhie
    #[error("the file seems not to be a valid ZIP archive because: {reason}")]
    InvalidZipArchive { reason: String },
    /// An error due to unsupported ZIP archive in this software
    #[error("this ZIP archive is not supported because: {reason}")]
    UnsupportedZipArchive { reason: String },
}