[][src]Struct carapax::longpoll::LongPollOptions

pub struct LongPollOptions { /* fields omitted */ }

Options for long polling

Methods

impl LongPollOptions[src]

pub fn limit(self, limit: i64) -> LongPollOptions[src]

Limits the number of updates to be retrieved

Values between 1—100 are accepted

Defaults to 100

pub fn poll_timeout(self, poll_timeout: Duration) -> LongPollOptions[src]

Timeout for long polling

0 - usual short polling

Defaults to 10

Should be positive, short polling should be used for testing purposes only

pub fn error_timeout(self, error_timeout: u64) -> LongPollOptions[src]

Timeout in seconds when an error has occurred

Defaults to 5

pub fn allowed_update(self, allowed_update: AllowedUpdate) -> LongPollOptions[src]

Adds a type of updates you want your bot to receive

Trait Implementations

impl Clone for LongPollOptions[src]

impl Debug for LongPollOptions[src]

impl Default for LongPollOptions[src]

impl Eq for LongPollOptions[src]

impl PartialEq<LongPollOptions> for LongPollOptions[src]

impl StructuralEq for LongPollOptions[src]

impl StructuralPartialEq for LongPollOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.