diff --git a/src/dispatching/update_listeners/polling.rs b/src/dispatching/update_listeners/polling.rs index 50f570ee..d827e0cf 100644 --- a/src/dispatching/update_listeners/polling.rs +++ b/src/dispatching/update_listeners/polling.rs @@ -71,7 +71,7 @@ where } /// Creates a polling update listener. - pub fn build(self) -> impl UpdateListener { + pub fn build(self) -> Polling { let Self { bot, timeout, limit, allowed_updates } = self; polling(bot, timeout, limit, allowed_updates) } @@ -93,7 +93,7 @@ where /// ## Notes /// /// This function will automatically delete a webhook if it was set up. -pub async fn polling_default(bot: R) -> impl UpdateListener +pub async fn polling_default(bot: R) -> Polling where R: Requester + Send + 'static, ::GetUpdates: Send, @@ -198,7 +198,7 @@ pub fn polling( timeout: Option, limit: Option, allowed_updates: Option>, -) -> impl UpdateListener +) -> Polling where R: Requester + Send + 'static, ::GetUpdates: Send, @@ -228,7 +228,7 @@ where } } -struct Polling { +pub struct Polling { bot: B, timeout: Option, limit: Option, @@ -238,7 +238,7 @@ struct Polling { } #[pin_project::pin_project] -struct PollingStream<'a, B: Requester> { +pub struct PollingStream<'a, B: Requester> { /// Parent structure polling: &'a mut Polling,