[][src]Enum tbot::types::keyboard::inline::ButtonKind

pub enum ButtonKind<'a> {
    Url(&'a str),
    LoginUrl(LoginUrl<'a>),
    CallbackData(&'a str),
    SwitchInlineQuery(&'a str),
    SwitchInlineQueryCurrentChat(&'a str),
    CallbackGame(Game),
    Pay(bool),
}

Represents different types an inline button can be.

Complete descriptions can be found in Bots API docs.

Variants

Url(&'a str)

Represents a URL button.

LoginUrl(LoginUrl<'a>)

Represents a login button.

CallbackData(&'a str)

Represents callback data.

SwitchInlineQuery(&'a str)

Represents query inserted when switched to inline.

SwitchInlineQueryCurrentChat(&'a str)

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

Methods

impl<'_> ButtonKind<'_>[src]

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

Checks if self is Url.

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

Checks if self is LoginUrl.

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<'a> PartialEq<ButtonKind<'a>> for ButtonKind<'a>[src]

impl<'a> Clone for ButtonKind<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

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

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

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

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<'a> Send for ButtonKind<'a>

impl<'a> Unpin for ButtonKind<'a>

impl<'a> Sync for ButtonKind<'a>

impl<'a> UnwindSafe for ButtonKind<'a>

impl<'a> RefUnwindSafe for ButtonKind<'a>

Blanket Implementations

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.

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

impl<T> BorrowMut<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]