1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, Error>;
7
8#[derive(Debug, Error)]
10pub enum Error {
11 #[error("io error: {0}")]
13 Io(#[from] std::io::Error),
14
15 #[error("zip error: {0}")]
17 Zip(#[from] zip::result::ZipError),
18
19 #[error("xml error: {0}")]
21 Xml(#[from] quick_xml::Error),
22
23 #[error("invalid ooxml: {0}")]
25 Invalid(String),
26
27 #[error("missing part: {0}")]
29 MissingPart(String),
30
31 #[error("unsupported: {0}")]
33 Unsupported(String),
34}