pub struct InlineKeyboardButton {Show 13 fields
pub text: String,
pub icon_custom_emoji_id: Option<String>,
pub style: Option<ButtonStyle>,
pub url: Option<String>,
pub callback_data: Option<String>,
pub web_app: Option<WebAppInfo>,
pub login_url: Option<LoginUrl>,
pub switch_inline_query: Option<String>,
pub switch_inline_query_current_chat: Option<String>,
pub switch_inline_query_chosen_chat: Option<SwitchInlineQueryChosenChat>,
pub copy_text: Option<CopyTextButton>,
pub callback_game: Option<Value>,
pub pay: Option<bool>,
}Expand description
One button in an inline keyboard.
Fields§
§text: StringLabel text on the button.
icon_custom_emoji_id: Option<String>Custom emoji identifier shown before the button text.
style: Option<ButtonStyle>Visual style of the button ("danger", "success", or "primary").
url: Option<String>URL to open when the button is pressed.
callback_data: Option<String>Data to be sent in a callback query (1–64 bytes).
web_app: Option<WebAppInfo>Web App to launch when the button is pressed.
login_url: Option<LoginUrl>Defines an authentication button.
switch_inline_query: Option<String>Pressing the button prompts the user to select a chat and opens an inline query.
switch_inline_query_current_chat: Option<String>Pressing the button opens an inline query in the current chat.
switch_inline_query_chosen_chat: Option<SwitchInlineQueryChosenChat>Prompts the user to select a specific type of chat for an inline query.
copy_text: Option<CopyTextButton>Describes a button that copies specified text to the clipboard.
callback_game: Option<Value>Description of the game that will be launched when the user presses the button.
pay: Option<bool>Specify true to send a Pay button (invoices only).
Implementations§
Trait Implementations§
Source§impl Clone for InlineKeyboardButton
impl Clone for InlineKeyboardButton
Source§fn clone(&self) -> InlineKeyboardButton
fn clone(&self) -> InlineKeyboardButton
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InlineKeyboardButton
impl Debug for InlineKeyboardButton
Source§impl<'de> Deserialize<'de> for InlineKeyboardButton
impl<'de> Deserialize<'de> for InlineKeyboardButton
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InlineKeyboardButton
impl RefUnwindSafe for InlineKeyboardButton
impl Send for InlineKeyboardButton
impl Sync for InlineKeyboardButton
impl Unpin for InlineKeyboardButton
impl UnsafeUnpin for InlineKeyboardButton
impl UnwindSafe for InlineKeyboardButton
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more