diff --git a/tokio-xmpp/ChangeLog b/tokio-xmpp/ChangeLog index 468f7e1bd4789a9c6c858c3b152bae81679f8441..0f975aa327a69942d81875fdf4192841a32b6c3e 100644 --- a/tokio-xmpp/ChangeLog +++ b/tokio-xmpp/ChangeLog @@ -39,6 +39,7 @@ XXXX-YY-ZZ RELEASER Future. - `rustls` is now re-exported if it is enabled, to allow applications to set the default crypto provider if needed. (!581) + - Derive Debug on Client and associated structs * Changes: - On Linux, once the TLS session is established, we can delegate the actual encryption and decryption to the kernel, which in turn can diff --git a/tokio-xmpp/src/client/iq.rs b/tokio-xmpp/src/client/iq.rs index bfa7cbeaf55204844d6865d22c164524227506c1..6703956e41066c13d16c7b359581ea2b677e5fdc 100644 --- a/tokio-xmpp/src/client/iq.rs +++ b/tokio-xmpp/src/client/iq.rs @@ -31,6 +31,7 @@ use crate::{ }; /// An IQ request payload +#[derive(Debug)] pub enum IqRequest { /// Payload for a `type="get"` request Get(Element), @@ -49,6 +50,7 @@ impl From for IqType { } /// An IQ response payload +#[derive(Debug)] pub enum IqResponse { /// Payload for a `type="result"` response. Result(Option), @@ -102,6 +104,7 @@ impl Error for IqFailure { type IqKey = (Option, String); type IqMap = BTreeMap; +#[derive(Debug)] struct IqMapEntryHandle { key: IqKey, map: Weak>, @@ -134,6 +137,7 @@ pin_project_lite::pin_project! { /// /// Dropping (cancelling) an `IqResponseToken` removes the internal /// bookkeeping required for tracking the response. + #[derive(Debug)] pub struct IqResponseToken { entry: Option, #[pin] @@ -217,6 +221,7 @@ impl Future for IqResponseToken { } } +#[derive(Debug)] struct IqResponseSink { inner: oneshot::Sender>, } @@ -228,6 +233,7 @@ impl IqResponseSink { } /// Utility struct to track IQ responses. +#[derive(Debug)] pub struct IqResponseTracker { map: Arc>, } diff --git a/tokio-xmpp/src/client/mod.rs b/tokio-xmpp/src/client/mod.rs index 248f085eabf2b11870d03da1761ebdf57885ab03..763827e4d746d304cc9cf0a6458e1954d83b0399 100644 --- a/tokio-xmpp/src/client/mod.rs +++ b/tokio-xmpp/src/client/mod.rs @@ -36,6 +36,7 @@ pub use iq::{IqFailure, IqRequest, IqResponse, IqResponseToken}; /// /// To send stanzas, the [`send_stanza`][`Client::send_stanza`] method can be /// used. +#[derive(Debug)] pub struct Client { stream: StanzaStream, bound_jid: Option, diff --git a/tokio-xmpp/src/stanzastream/mod.rs b/tokio-xmpp/src/stanzastream/mod.rs index ab29059fe8ff1c06e7711db3bc8db58bd8c7e9a2..e9d10524deba05d98bc914579c4c7fc631d4b93d 100644 --- a/tokio-xmpp/src/stanzastream/mod.rs +++ b/tokio-xmpp/src/stanzastream/mod.rs @@ -90,6 +90,7 @@ pub enum Event { } /// Frontend interface to a reliable, always-online stanza stream. +#[derive(Debug)] pub struct StanzaStream { rx: mpsc::Receiver, tx: mpsc::Sender,