diff options
Diffstat (limited to 'src/dav/error.rs')
-rw-r--r-- | src/dav/error.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/dav/error.rs b/src/dav/error.rs new file mode 100644 index 0000000..1db2895 --- /dev/null +++ b/src/dav/error.rs @@ -0,0 +1,20 @@ +use quick_xml::events::attributes::AttrError; + +#[derive(Debug)] +pub enum ParsingError { + NamespacePrefixAlreadyUsed, + WrongToken, + TagNotFound, + QuickXml(quick_xml::Error), + Eof +} +impl From<AttrError> for ParsingError { + fn from(value: AttrError) -> Self { + Self::QuickXml(value.into()) + } +} +impl From<quick_xml::Error> for ParsingError { + fn from(value: quick_xml::Error) -> Self { + Self::QuickXml(value) + } +} |