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§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 for KeyboardButton
impl PartialEq for KeyboardButton
Source§impl PartialOrd for KeyboardButton
impl PartialOrd for KeyboardButton
Source§impl Serialize for KeyboardButton
impl Serialize for KeyboardButton
impl StructuralPartialEq for KeyboardButton
Auto Trait Implementations§
impl Freeze for KeyboardButton
impl RefUnwindSafe for KeyboardButton
impl Send for KeyboardButton
impl Sync for KeyboardButton
impl Unpin for KeyboardButton
impl UnsafeUnpin for KeyboardButton
impl UnwindSafe for KeyboardButton
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more