aboutsummaryrefslogtreecommitdiffstats
path: root/stanza/src/client/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stanza/src/client/mod.rs')
-rw-r--r--stanza/src/client/mod.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/stanza/src/client/mod.rs b/stanza/src/client/mod.rs
index 3e690a7..a1b2de5 100644
--- a/stanza/src/client/mod.rs
+++ b/stanza/src/client/mod.rs
@@ -61,3 +61,27 @@ impl IntoContent for Stanza {
}
}
}
+
+impl From<Message> for Stanza {
+ fn from(value: Message) -> Self {
+ Stanza::Message(value)
+ }
+}
+
+impl From<Presence> for Stanza {
+ fn from(value: Presence) -> Self {
+ Stanza::Presence(value)
+ }
+}
+
+impl From<Iq> for Stanza {
+ fn from(value: Iq) -> Self {
+ Stanza::Iq(value)
+ }
+}
+
+impl From<StreamError> for Stanza {
+ fn from(value: StreamError) -> Self {
+ Stanza::Error(value)
+ }
+}