From 6385e43e8ca467e53c6a705a932016c5af75c3a2 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Sun, 22 Dec 2024 18:58:28 +0000 Subject: implement sink and stream with tokio::spawn --- stanza/src/client/presence.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'stanza/src/client/presence.rs') diff --git a/stanza/src/client/presence.rs b/stanza/src/client/presence.rs index dd14bff..5354966 100644 --- a/stanza/src/client/presence.rs +++ b/stanza/src/client/presence.rs @@ -8,6 +8,7 @@ use peanuts::{ use super::{error::Error, XMLNS}; +#[derive(Debug)] pub struct Presence { from: Option, id: Option, @@ -70,7 +71,7 @@ impl IntoElement for Presence { pub enum Other {} -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug)] pub enum PresenceType { Error, Probe, @@ -112,7 +113,7 @@ impl ToString for PresenceType { } } -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug)] pub enum Show { Away, Chat, @@ -160,7 +161,7 @@ impl ToString for Show { } } -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct Status { lang: Option, status: String1024, @@ -188,7 +189,7 @@ impl IntoElement for Status { // TODO: enforce? /// minLength 1 maxLength 1024 -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct String1024(pub String); impl FromStr for String1024 { @@ -206,7 +207,7 @@ impl ToString for String1024 { } // xs:byte -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Debug)] pub struct Priority(pub i8); impl FromElement for Priority { -- cgit