Struct telegram_bot_raw_ars::types::reply_markup::KeyboardButton
source · pub struct KeyboardButton { /* private fields */ }
Expand description
This object represents one button of the reply keyboard.
Implementations§
source§impl KeyboardButton
impl KeyboardButton
pub fn new<S: AsRef<str>>(text: S) -> Self
sourcepub fn request_contact(&mut self) -> &mut Self
pub fn request_contact(&mut self) -> &mut Self
The user’s phone number will be sent as a contact when the button is pressed. Available in private chats only
sourcepub fn request_location(&mut self) -> &mut Self
pub fn request_location(&mut self) -> &mut Self
The user’s current location will be sent when the button is pressed. Available in private chats only
Trait Implementations§
source§impl Clone for KeyboardButton
impl Clone for KeyboardButton
source§fn clone(&self) -> KeyboardButton
fn clone(&self) -> KeyboardButton
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 KeyboardButton
impl Debug for KeyboardButton
source§impl<'a> From<&'a str> for KeyboardButton
impl<'a> From<&'a str> for KeyboardButton
source§fn from(value: &'a str) -> KeyboardButton
fn from(value: &'a str) -> KeyboardButton
Converts to this type from the input type.
source§impl From<String> for KeyboardButton
impl From<String> for KeyboardButton
source§fn from(value: String) -> KeyboardButton
fn from(value: String) -> KeyboardButton
Converts to this type from the input type.
source§impl PartialEq<KeyboardButton> for KeyboardButton
impl PartialEq<KeyboardButton> for KeyboardButton
source§fn eq(&self, other: &KeyboardButton) -> bool
fn eq(&self, other: &KeyboardButton) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<KeyboardButton> for KeyboardButton
impl PartialOrd<KeyboardButton> for KeyboardButton
source§fn partial_cmp(&self, other: &KeyboardButton) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyboardButton) -> 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 more