diff options
author | cel 🌸 <cel@blos.sm> | 2023-08-05 20:14:09 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-08-05 20:14:09 +0100 |
commit | 5334cd4ed69d12e4265b8b97ae9e7ed02f78a9ff (patch) | |
tree | 4f901d7543fa52e6ec5dac73ab6eef8f6c42e570 /src/error.rs | |
parent | dec6f0105d0da5f06f685d49fd4b118975542d07 (diff) | |
download | luz-5334cd4ed69d12e4265b8b97ae9e7ed02f78a9ff.tar.gz luz-5334cd4ed69d12e4265b8b97ae9e7ed02f78a9ff.tar.bz2 luz-5334cd4ed69d12e4265b8b97ae9e7ed02f78a9ff.zip |
WIP: refactor Element type - namespace work
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs index 8aa98ae..9278f1b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -5,7 +5,7 @@ use rsasl::mechname::MechanismNameError; use crate::{ jid::ParseError, - stanza::{self, ElementError}, + stanza::{self, ElementError, ElementParseError}, }; #[derive(Debug)] @@ -22,6 +22,7 @@ pub enum JabberError { NoType, IDMismatch, BindError, + ElementParse(ElementParseError), ParseError, UnexpectedEnd, UnexpectedElement, @@ -87,3 +88,9 @@ impl From<ParseError> for JabberError { Self::JID(e) } } + +impl From<ElementParseError> for JabberError { + fn from(e: ElementParseError) -> Self { + Self::ElementParse(e) + } +} |