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

#[non_exhaustive]
#[must_use]
pub enum Any<'a> {
    Inline(Keyboard<'a>),
    Reply(Keyboard<'a>),
    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<'a>)

An inline keyboard.

Reply(Keyboard<'a>)

A reply markup.

RemoveReply(Remove)

Removes reply markup.

ForceReply(ForceReply)

Forces reply.

Methods

impl<'a> Any<'a>[src]

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

Returns true if self is of variant Inline.

pub fn expect_inline(self) -> Keyboard<'a> 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<'a>>[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<'a> 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<'a>>[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<'a> Clone for Any<'a>[src]

impl<'a> Copy for Any<'a>[src]

impl<'a> Debug for Any<'a>[src]

impl<'a> Eq for Any<'a>[src]

impl<'a> From<&'a [&'a [Button<'a>]]> for Any<'a>[src]

impl<'a> From<&'a [&'a [Button<'a>]]> for Any<'a>[src]

impl<'a> From<ForceReply> for Any<'a>[src]

impl<'a> From<Keyboard<'a>> for Any<'a>[src]

impl<'a> From<Keyboard<'a>> for Any<'a>[src]

impl<'a> From<Remove> for Any<'a>[src]

impl<'a> Hash for Any<'a>[src]

impl<'a> PartialEq<Any<'a>> for Any<'a>[src]

impl<'a> Serialize for Any<'a>[src]

impl<'a> StructuralEq for Any<'a>[src]

impl<'a> StructuralPartialEq for Any<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Any<'a>

impl<'a> Send for Any<'a>

impl<'a> Sync for Any<'a>

impl<'a> Unpin for Any<'a>

impl<'a> UnwindSafe for Any<'a>

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.