presence: Make PresencePayload a trait, and implement it on every payload.

This commit is contained in:
Emmanuel Gil Peyrot 2018-09-20 20:51:48 +02:00
commit e41de29d9d
7 changed files with 20 additions and 61 deletions

View file

@ -9,6 +9,7 @@ use std::collections::BTreeMap;
use minidom::Element;
use presence::PresencePayload;
use error::Error;
use jid::Jid;
use ns;
@ -212,6 +213,8 @@ pub struct StanzaError {
pub other: Option<Element>,
}
impl PresencePayload for StanzaError {}
impl TryFrom<Element> for StanzaError {
type Err = Error;