Merge branch 'master' into 'master'
Implement From<BareJid> and From<FullJid> for Jid. See merge request xmpp-rs/jid-rs!15
This commit is contained in:
commit
36b51171ce
1 changed files with 12 additions and 0 deletions
12
src/lib.rs
12
src/lib.rs
|
@ -80,6 +80,18 @@ impl From<Jid> for String {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<BareJid> for Jid {
|
||||||
|
fn from(bare_jid: BareJid) -> Jid {
|
||||||
|
Jid::Bare(bare_jid)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<FullJid> for Jid {
|
||||||
|
fn from(full_jid: FullJid) -> Jid {
|
||||||
|
Jid::Full(full_jid)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// A struct representing a full Jabber ID.
|
/// A struct representing a full Jabber ID.
|
||||||
///
|
///
|
||||||
/// A full Jabber ID is composed of 3 components, of which one is optional:
|
/// A full Jabber ID is composed of 3 components, of which one is optional:
|
||||||
|
|
Loading…
Reference in a new issue