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

@ -6,6 +6,7 @@
use try_from::TryFrom;
use presence::PresencePayload;
use disco::{Feature, Identity, DiscoInfoResult, DiscoInfoQuery};
use data_forms::DataForm;
use hashes::{Hash, Algo};
@ -39,6 +40,8 @@ pub struct Caps {
pub hash: Hash,
}
impl PresencePayload for Caps {}
impl TryFrom<Element> for Caps {
type Err = Error;