message: Make MessagePayload a trait, and implement it on every payload.

This commit is contained in:
Emmanuel Gil Peyrot 2018-09-20 20:58:27 +02:00
commit 07cccad356
10 changed files with 36 additions and 89 deletions

View file

@ -9,6 +9,7 @@ use std::collections::BTreeMap;
use minidom::Element;
use message::MessagePayload;
use presence::PresencePayload;
use error::Error;
use jid::Jid;
@ -213,6 +214,7 @@ pub struct StanzaError {
pub other: Option<Element>,
}
impl MessagePayload for StanzaError {}
impl PresencePayload for StanzaError {}
impl TryFrom<Element> for StanzaError {