1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum Error {
8 #[error("OPC error: {0}")]
10 Opc(#[from] ooxml_opc::Error),
11
12 #[error("XML error: {0}")]
14 Xml(#[from] quick_xml::Error),
15
16 #[error("I/O error: {0}")]
18 Io(#[from] std::io::Error),
19
20 #[error("Invalid content: {0}")]
22 Invalid(String),
23
24 #[error("Unsupported feature: {0}")]
26 Unsupported(String),
27
28 #[error("Serialize error: {0}")]
30 Serialize(#[from] crate::generated_serializers::SerializeError),
31}
32
33pub type Result<T> = std::result::Result<T, Error>;