From 8e5d8a8aaa7bde2357ca70542a88f744005d58ba Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 5 Mar 2024 16:07:47 +0100 Subject: Refactor encoder+decoder WIP (compile) --- src/dav/error.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/dav/error.rs (limited to 'src/dav/error.rs') 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 for ParsingError { + fn from(value: AttrError) -> Self { + Self::QuickXml(value.into()) + } +} +impl From for ParsingError { + fn from(value: quick_xml::Error) -> Self { + Self::QuickXml(value) + } +} -- cgit v1.2.3