diff --git a/src/lib.rs b/src/lib.rs index 29982c7..2401792 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -80,6 +80,18 @@ impl From for String { } } +impl From for Jid { + fn from(bare_jid: BareJid) -> Jid { + Jid::Bare(bare_jid) + } +} + +impl From for Jid { + fn from(full_jid: FullJid) -> Jid { + Jid::Full(full_jid) + } +} + /// A struct representing a full Jabber ID. /// /// A full Jabber ID is composed of 3 components, of which one is optional: