Enum tbot::types::keyboard::Any[][src]

#[non_exhaustive]
#[must_use]
pub enum Any {
    Inline(Keyboard),
    Reply(Keyboard),
    RemoveReply(Remove),
    ForceReply(ForceReply),
}

An enum of possible keyboards.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Inline(Keyboard)

An inline keyboard.

Reply(Keyboard)

A reply markup.

RemoveReply(Remove)

Removes reply markup.

ForceReply(ForceReply)

Forces reply.

Implementations

impl Any[src]

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

Returns true if self is of variant Inline.

pub fn expect_inline(self) -> Keyboard where
    Self: Debug
[src]

Unwraps the value, yielding the content of Inline.

Panics

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

pub fn inline(self) -> Option<Keyboard>[src]

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

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

Returns true if self is of variant Reply.

pub fn expect_reply(self) -> Keyboard where
    Self: Debug
[src]

Unwraps the value, yielding the content of Reply.

Panics

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

pub fn reply(self) -> Option<Keyboard>[src]

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

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

Returns true if self is of variant RemoveReply.

pub fn expect_remove_reply(self) -> Remove where
    Self: Debug
[src]

Unwraps the value, yielding the content of RemoveReply.

Panics

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

pub fn remove_reply(self) -> Option<Remove>[src]

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

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

Returns true if self is of variant ForceReply.

pub fn expect_force_reply(self) -> ForceReply where
    Self: Debug
[src]

Unwraps the value, yielding the content of ForceReply.

Panics

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

pub fn force_reply(self) -> Option<ForceReply>[src]

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

Trait Implementations

impl Clone for Any[src]

impl Debug for Any[src]

impl From<ForceReply> for Any[src]

impl From<Keyboard> for Any[src]

impl From<Keyboard> for Any[src]

impl From<Remove> for Any[src]

impl From<Vec<Vec<Button, Global>, Global>> for Any[src]

impl From<Vec<Vec<Button, Global>, Global>> for Any[src]

impl Hash for Any[src]

impl PartialEq<Any> for Any[src]

impl Serialize for Any[src]

impl Eq for Any[src]

impl StructuralEq for Any[src]

impl StructuralPartialEq for Any[src]

Auto Trait Implementations

impl RefUnwindSafe for Any

impl Send for Any

impl Sync for Any

impl Unpin for Any

impl UnwindSafe for Any

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> 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.