use peanuts::element::{FromElement, IntoElement}; use crate::JID; use super::error::Error; pub struct Presence { from: Option, id: Option, to: Option, r#type: PresenceType, lang: Option, // children show: Option, status: Option, priority: Option, errors: Vec, // ##other // content: Vec>, } pub enum PresenceType { Error, Probe, Subscribe, Subscribed, Unavailable, Unsubscribe, Unsubscribed, } pub enum Show { Away, Chat, Dnd, Xa, } pub struct Status { lang: Option, status: String1024, } // minLength 1 maxLength 1024 pub struct String1024(String); // xs:byte pub struct Priority(u8);