diff --git a/src/adaptors/auto_send.rs b/src/adaptors/auto_send.rs index 21db37b8..7ecf8792 100644 --- a/src/adaptors/auto_send.rs +++ b/src/adaptors/auto_send.rs @@ -38,7 +38,7 @@ use crate::{ /// let myself: Me = bot.get_me().await?; // No .send()! /// # Ok::<_, teloxide_core::RequestError>(()) }; /// ``` -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct AutoSend { bot: B, } diff --git a/src/adaptors/cache_me.rs b/src/adaptors/cache_me.rs index 1d3b696c..2f096d9a 100644 --- a/src/adaptors/cache_me.rs +++ b/src/adaptors/cache_me.rs @@ -19,7 +19,7 @@ use crate::{ /// /// Bot's user is hardly ever changed, so sometimes it's reasonable to cache /// response from `get_me` method. -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct CacheMe { bot: B, me: Arc>, diff --git a/src/adaptors/erased.rs b/src/adaptors/erased.rs index cd92c122..9c19fcab 100644 --- a/src/adaptors/erased.rs +++ b/src/adaptors/erased.rs @@ -34,6 +34,12 @@ impl<'a, E> ErasedRequester<'a, E> { } } +impl std::fmt::Debug for ErasedRequester<'_, E> { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("ErasedRequester").finish_non_exhaustive() + } +} + /// [`Request`] with erased type. pub struct ErasedRequest<'a, T, E> { inner: Box + 'a>, diff --git a/src/adaptors/parse_mode.rs b/src/adaptors/parse_mode.rs index ddef2661..0adce419 100644 --- a/src/adaptors/parse_mode.rs +++ b/src/adaptors/parse_mode.rs @@ -8,7 +8,7 @@ use crate::{ /// Default parse mode adaptor, see /// [`RequesterExt::parse_mode`](crate::requests::RequesterExt::parse_mode). -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct DefaultParseMode { bot: B, mode: ParseMode, diff --git a/src/adaptors/throttle.rs b/src/adaptors/throttle.rs index 7cae78ac..94652dad 100644 --- a/src/adaptors/throttle.rs +++ b/src/adaptors/throttle.rs @@ -63,7 +63,7 @@ use crate::{ /// /// As such, we encourage not to use `ChatId::ChannelUsername(u)` with this bot /// wrapper. -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct Throttle { bot: B, // `RequestLock` allows to unlock requests (allowing them to be sent). diff --git a/src/adaptors/trace.rs b/src/adaptors/trace.rs index 80cf7ac9..adc09bf3 100644 --- a/src/adaptors/trace.rs +++ b/src/adaptors/trace.rs @@ -25,7 +25,7 @@ use crate::{ /// TRACE teloxide_core::adaptors::trace > Sending `SendDice` request: SendDice { chat_id: Id(0), emoji: Some(Dice), disable_notification: None, reply_to_message_id: None, allow_sending_without_reply: None, reply_markup: None } /// TRACE teloxide_core::adaptors::trace > Got response from `SendDice` request: Ok(Message { id: 13812, date: 1625926524, chat: Chat { .. }, via_bot: None, kind: Dice(MessageDice { dice: Dice { emoji: Dice, value: 3 } }) }) /// ``` -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct Trace { inner: B, settings: Settings,