Struct telegram_bot_ars::types::InlineKeyboardButton
source · pub struct InlineKeyboardButton { /* private fields */ }Expand description
This object represents one button of an inline keyboard.
Implementations§
source§impl InlineKeyboardButton
impl InlineKeyboardButton
sourcepub fn callback<T, C>(text: T, callback: C) -> InlineKeyboardButtonwhere
T: AsRef<str>,
C: AsRef<str>,
pub fn callback<T, C>(text: T, callback: C) -> InlineKeyboardButtonwhere
T: AsRef<str>,
C: AsRef<str>,
Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
sourcepub fn url<T, U>(text: T, url: U) -> InlineKeyboardButtonwhere
T: AsRef<str>,
U: AsRef<str>,
pub fn url<T, U>(text: T, url: U) -> InlineKeyboardButtonwhere
T: AsRef<str>,
U: AsRef<str>,
HTTP or tg:// url to be opened when button is pressed
sourcepub fn switch_inline_query<T, Q>(text: T, query: Q) -> InlineKeyboardButtonwhere
T: AsRef<str>,
Q: AsRef<str>,
pub fn switch_inline_query<T, Q>(text: T, query: Q) -> InlineKeyboardButtonwhere
T: AsRef<str>,
Q: AsRef<str>,
Pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
sourcepub fn switch_inline_query_current_chat<T, Q>(
text: T,
query: Q
) -> InlineKeyboardButtonwhere
T: AsRef<str>,
Q: AsRef<str>,
pub fn switch_inline_query_current_chat<T, Q>(
text: T,
query: Q
) -> InlineKeyboardButtonwhere
T: AsRef<str>,
Q: AsRef<str>,
Pressing the button will insert the bot‘s username and the specified inline query in the current chat’s input field. Can be empty, in which case just the bot’s username will be inserted.
Trait Implementations§
source§impl Clone for InlineKeyboardButton
impl Clone for InlineKeyboardButton
source§fn clone(&self) -> InlineKeyboardButton
fn clone(&self) -> InlineKeyboardButton
Returns a copy of the value. Read more
1.0.0 · 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 PartialEq<InlineKeyboardButton> for InlineKeyboardButton
impl PartialEq<InlineKeyboardButton> for InlineKeyboardButton
source§fn eq(&self, other: &InlineKeyboardButton) -> bool
fn eq(&self, other: &InlineKeyboardButton) -> bool
source§impl PartialOrd<InlineKeyboardButton> for InlineKeyboardButton
impl PartialOrd<InlineKeyboardButton> for InlineKeyboardButton
source§fn partial_cmp(&self, other: &InlineKeyboardButton) -> Option<Ordering>
fn partial_cmp(&self, other: &InlineKeyboardButton) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for InlineKeyboardButton
impl Serialize for InlineKeyboardButton
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more