pptx_to_md/
lib.rs

1mod container;
2mod slide;
3mod types;
4mod constants;
5pub mod parse_xml;
6pub mod parse_rels;
7mod parser_config;
8
9pub use container::PptxContainer;
10pub use parser_config::{ParserConfig, ImageHandlingMode};
11pub use slide::Slide;
12pub use types::*;
13
14#[derive(Debug, thiserror::Error)]
15pub enum Error {
16    #[error("Zip error: {0}")]
17    Zip(#[from] zip::result::ZipError),
18
19    #[error("XML parse error: {0}")]
20    Xml(#[from] roxmltree::Error),
21
22    #[error("UTF-8 conversion error: {0}")]
23    Utf8(#[from] std::str::Utf8Error),
24
25    #[error("Slide not found")]
26    SlideNotFound,
27
28    #[error("IO error: {0}")]
29    Io(#[from] std::io::Error),
30
31    #[error("Parse error: {0}")]
32    ParseError(&'static str),
33
34    #[error("Image not found")]
35    ImageNotFound,
36
37    #[error("Relationship not found")]
38    RelationshipNotFound,
39
40    #[error("Conversion was not possible")]
41    ConversionFailed,
42
43    #[error("Conversion was not possible")]
44    MultiThreadedConversionFailed,
45
46    #[error("Unbekannter Fehler")]
47    Unknown,
48}
49
50pub type Result<T> = std::result::Result<T, Error>;