Enum tbot::errors::PollingSetup[][src]

pub enum PollingSetup {
    DeleteWebhook(MethodCall),
    DeleteWebhookTimeout(Elapsed),
    SetMyCommands(MethodCall),
    SetMyCommandsTimeout(Elapsed),
}

Represents possible errors that may happen during preparation of the polling event loop.

Variants

DeleteWebhook(MethodCall)

Calling the deleteWebhook method resulted in an error.

DeleteWebhookTimeout(Elapsed)

Calling the deleteWebhook method timed out.

SetMyCommands(MethodCall)

Calling the setMyCommands method resulted in an error.

SetMyCommandsTimeout(Elapsed)

Calling the setMyCommands method timed out.

Implementations

impl PollingSetup[src]

pub fn is_delete_webhook(&self) -> bool[src]

Returns true if self is of variant DeleteWebhook.

pub fn expect_delete_webhook(self) -> MethodCall where
    Self: Debug
[src]

Unwraps the value, yielding the content of DeleteWebhook.

Panics

Panics if the value is not DeleteWebhook, with a panic message including the content of self.

pub fn delete_webhook(self) -> Option<MethodCall>[src]

Returns Some if self is of variant DeleteWebhook, and None otherwise.

pub fn is_delete_webhook_timeout(&self) -> bool[src]

Returns true if self is of variant DeleteWebhookTimeout.

pub fn expect_delete_webhook_timeout(self) -> Elapsed where
    Self: Debug
[src]

Unwraps the value, yielding the content of DeleteWebhookTimeout.

Panics

Panics if the value is not DeleteWebhookTimeout, with a panic message including the content of self.

pub fn delete_webhook_timeout(self) -> Option<Elapsed>[src]

Returns Some if self is of variant DeleteWebhookTimeout, and None otherwise.

pub fn is_set_my_commands(&self) -> bool[src]

Returns true if self is of variant SetMyCommands.

pub fn expect_set_my_commands(self) -> MethodCall where
    Self: Debug
[src]

Unwraps the value, yielding the content of SetMyCommands.

Panics

Panics if the value is not SetMyCommands, with a panic message including the content of self.

pub fn set_my_commands(self) -> Option<MethodCall>[src]

Returns Some if self is of variant SetMyCommands, and None otherwise.

pub fn is_set_my_commands_timeout(&self) -> bool[src]

Returns true if self is of variant SetMyCommandsTimeout.

pub fn expect_set_my_commands_timeout(self) -> Elapsed where
    Self: Debug
[src]

Unwraps the value, yielding the content of SetMyCommandsTimeout.

Panics

Panics if the value is not SetMyCommandsTimeout, with a panic message including the content of self.

pub fn set_my_commands_timeout(self) -> Option<Elapsed>[src]

Returns Some if self is of variant SetMyCommandsTimeout, and None otherwise.

Trait Implementations

impl Debug for PollingSetup[src]

impl From<Elapsed> for PollingSetup[src]

impl From<MethodCall> for PollingSetup[src]

Auto Trait Implementations

impl !RefUnwindSafe for PollingSetup

impl Send for PollingSetup

impl Sync for PollingSetup

impl Unpin for PollingSetup

impl !UnwindSafe for PollingSetup

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<T> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.