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) -> InlineKeyboardButton
pub fn callback<T, C>(text: T, callback: C) -> InlineKeyboardButton
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) -> InlineKeyboardButton
pub fn url<T, U>(text: T, url: U) -> InlineKeyboardButton
HTTP or tg:// url to be opened when button is pressed
Sourcepub fn switch_inline_query<T, Q>(text: T, query: Q) -> InlineKeyboardButton
pub fn switch_inline_query<T, Q>(text: T, query: Q) -> InlineKeyboardButton
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,
) -> InlineKeyboardButton
pub fn switch_inline_query_current_chat<T, Q>( text: T, query: Q, ) -> InlineKeyboardButton
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 duplicate 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 for InlineKeyboardButton
impl PartialEq for InlineKeyboardButton
Source§impl PartialOrd for InlineKeyboardButton
impl PartialOrd for InlineKeyboardButton
Source§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
impl StructuralPartialEq for InlineKeyboardButton
Auto Trait Implementations§
impl Freeze for InlineKeyboardButton
impl RefUnwindSafe for InlineKeyboardButton
impl Send for InlineKeyboardButton
impl Sync for InlineKeyboardButton
impl Unpin 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