refactor: better xml support and error prop

This commit is contained in:
Cain 2024-02-02 20:57:07 +00:00
parent 744230455c
commit 4675b24ff3
2 changed files with 97 additions and 48 deletions

View file

@ -11,9 +11,15 @@ pub enum Error {
#[error("Gamedig Error: {0}")]
Gamedig(#[from] gamedig::errors::GDError),
#[cfg(any(feature = "json", feature = "xml"))]
#[error("Serde Error: {0}")]
Serde(#[from] serde_json::Error),
#[cfg(feature = "bson")]
#[error("Bson Error: {0}")]
Bson(#[from] bson::ser::Error),
#[cfg(feature = "xml")]
#[error("Xml Error: {0}")]
Xml(#[from] quick_xml::Error),