1use std::fmt::{self, Debug, Display, Formatter};
2use zip::result::ZipError;
3
4
5
6pub struct Error(pub(crate) ZipError);
8impl Debug for Error { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { Debug ::fmt(&self.0, fmt) } }
13impl Display for Error { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { Display::fmt(&self.0, fmt) } }
14impl std::error::Error for Error {}
15impl Error {
16 pub(crate) fn unsupported(s: &'static str) -> Self { Self(ZipError::UnsupportedArchive(s)) }
17}
18
19
20
21pub type Result<T> = std::result::Result<T, Error>;