pub struct Key {
pub raw: KeyboardButton,
}Expand description
Key to be used as the reply markup of an alternate virtual keyboard.
Fields§
§raw: KeyboardButtonImplementations§
Source§impl Key
impl Key
Sourcepub fn text<T: Into<String>>(text: T) -> Key
pub fn text<T: Into<String>>(text: T) -> Key
Creates a simple keyboard key.
When pressed, the button’s text will be sent as a normal message, as if the user had typed it.
Sourcepub fn request_phone<T: Into<String>>(text: T) -> Key
pub fn request_phone<T: Into<String>>(text: T) -> Key
Creates a keyboard key to request the user’s contact information (including the phone).
Sourcepub fn request_geo<T: Into<String>>(text: T) -> Key
pub fn request_geo<T: Into<String>>(text: T) -> Key
Creates a keyboard key to request the user’s current geo-location.
Sourcepub fn request_poll<T: Into<String>>(text: T) -> Key
pub fn request_poll<T: Into<String>>(text: T) -> Key
Creates a keyboard key that will direct the user to create and send a poll when pressed.
This is only available in direct conversations with the user.
Sourcepub fn request_quiz<T: Into<String>>(text: T) -> Key
pub fn request_quiz<T: Into<String>>(text: T) -> Key
Creates a keyboard key identical to Self::request_poll, except the poll requested must be a quiz.
This is only available in direct conversations with the user.
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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