#[non_exhaustive]
pub enum Kind {
    Url(String),
    LoginUrl(LoginUrl),
    CallbackData(String),
    SwitchInlineQuery(String),
    SwitchInlineQueryCurrentChat(String),
    CallbackGame(Game),
    Pay,
}
Expand description

Represents different types an inline button can be.

Complete descriptions can be found in Bots API docs.

Variants (Non-exhaustive)§

This enum is marked as 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.
§

Url(String)

Represents a URL button.

§

LoginUrl(LoginUrl)

Represents a login 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

Represents a pay button.

Implementations§

Returns true if self is of variant Url.

Unwraps the value, yielding the content of Url.

Panics

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

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

Returns true if self is of variant LoginUrl.

Unwraps the value, yielding the content of LoginUrl.

Panics

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

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

Returns true if self is of variant CallbackData.

Unwraps the value, yielding the content of CallbackData.

Panics

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

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

Returns true if self is of variant SwitchInlineQuery.

Unwraps the value, yielding the content of SwitchInlineQuery.

Panics

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

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

Returns true if self is of variant SwitchInlineQueryCurrentChat.

Unwraps the value, yielding the content of SwitchInlineQueryCurrentChat.

Panics

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

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

Returns true if self is of variant CallbackGame.

Unwraps the value, yielding the content of CallbackGame.

Panics

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

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

Returns true if self is of variant Pay.

Constructs a ButtonKind::Url.

Constructs a ButtonKind::LoginUrl.

Constructs a ButtonKind::CallbackData.

Constructs a ButtonKind::SwitchInlineQuery.

Constructs a ButtonKind::SwitchInlineQueryCurrentChat.

Constructs a ButtonKind::CallbackGame.

Constructs a ButtonKind::Pay.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more