1use std::io;
6
7use thiserror::Error;
8
9#[cfg(test)]
10mod test_utils;
11
12mod types;
13
14pub use types::*;
15
16#[cfg(feature = "interop")]
17pub mod interop;
18
19#[derive(Debug, Error)]
20pub enum Error {
21 #[error("failed to serialize structure as XML: {0}")]
22 Serialize(#[from] xml_struct::Error),
23
24 #[error("failed to deserialize structure from XML: {0}")]
25 Deserialize(#[from] serde_path_to_error::Error<quick_xml::DeError>),
26
27 #[error("I/O error: {0}")]
28 Io(#[from] io::Error),
29
30 #[error("invalid XML document: {0}")]
31 InvalidXml(#[from] quick_xml::Error),
32
33 #[error("unexpected response body")]
34 UnexpectedResponse(Vec<u8>),
35
36 #[error("a fault occurred in the request")]
39 RequestFault(Box<soap::Fault>),
40
41 #[error("unknown server version: {0}")]
42 UnknownServerVersion(String),
43}