Struct telegram_bot_ars::types::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>(text: S) -> KeyboardButtonwhere
S: AsRef<str>,
sourcepub fn request_contact(&mut self) -> &mut KeyboardButton
pub fn request_contact(&mut self) -> &mut KeyboardButton
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 KeyboardButton
pub fn request_location(&mut self) -> &mut KeyboardButton
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
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 moresource§impl Serialize for KeyboardButton
impl Serialize for KeyboardButton
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