[][src]Enum tbot::types::message::inline_markup::ButtonKind

pub enum ButtonKind {
    Url(String),
    CallbackData(String),
    SwitchInlineQuery(String),
    SwitchInlineQueryCurrentChat(String),
    CallbackGame(Game),
    Pay(bool),
}

Represents different types an inline button can be.

Complete descriptions can be found in Bots API docs.

Variants

Url(String)

Represents a URL button.

CallbackData(String)

Represents callback data.

SwitchInlineQuery(String)

Represents query inserted when switched to inline.

SwitchInlineQueryCurrentChat(String)

Represents query inserted when switched to inline in the curent chat.

CallbackGame(Game)

Represent a description of the game to be laucnhed.

Pay(bool)

if true, a pay button.

Methods

impl ButtonKind[src]

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

Checks if self is Url.

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

Checks if self is CallbackData.

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

Checks if self is SwitchInlineQuery.

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

Checks if self is SwitchInlineQueryCurrentChat.

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

Checks if self is CallbackGame.

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

Checks if self is Pay.

Trait Implementations

impl Eq for ButtonKind[src]

impl Clone for ButtonKind[src]

impl PartialEq<ButtonKind> for ButtonKind[src]

impl Hash for ButtonKind[src]

impl Debug for ButtonKind[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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

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

impl<T> Erased for T