pub struct PollingConfig {
pub poll_interval: Duration,
pub timeout: Duration,
pub bootstrap_retries: i32,
pub allowed_updates: Option<Vec<String>>,
pub drop_pending_updates: bool,
pub get_updates: GetUpdatesFn,
pub delete_webhook: DeleteWebhookFn,
}Expand description
Configuration for Updater::start_polling.
Fields§
§poll_interval: DurationInterval between successive poll requests.
timeout: DurationLong-polling timeout sent to the Telegram API.
bootstrap_retries: i32Maximum number of retries during the bootstrap phase.
allowed_updates: Option<Vec<String>>List of update types the bot should receive, or None for all types.
drop_pending_updates: boolWhether to drop pending updates before starting the polling loop.
get_updates: GetUpdatesFnThe function used to call getUpdates.
delete_webhook: DeleteWebhookFnThe function used to delete the webhook during bootstrap.
Trait Implementations§
Source§impl Clone for PollingConfig
impl Clone for PollingConfig
Source§fn clone(&self) -> PollingConfig
fn clone(&self) -> PollingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PollingConfig
impl !RefUnwindSafe for PollingConfig
impl Send for PollingConfig
impl Sync for PollingConfig
impl Unpin for PollingConfig
impl UnsafeUnpin for PollingConfig
impl !UnwindSafe for PollingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more