#[non_exhaustive]pub struct ReplyKeyboardMarkup {
pub keyboard: Vec<Vec<KeyboardButton>>,
pub resize_keyboard: Option<bool>,
pub one_time_keyboard: Option<bool>,
pub selective: Option<bool>,
pub input_field_placeholder: Option<String>,
pub is_persistent: Option<bool>,
}Expand description
Custom keyboard with reply options. Not supported in channels and for messages sent on behalf of a Telegram Business account.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.keyboard: Vec<Vec<KeyboardButton>>Array of button rows, each represented by an array of KeyboardButton objects.
resize_keyboard: Option<bool>true to request clients to resize the keyboard vertically for optimal fit.
one_time_keyboard: Option<bool>true to request clients to hide the keyboard as soon as it has been used.
selective: Option<bool>true to show the keyboard to specific users only.
input_field_placeholder: Option<String>Placeholder shown in the input field when the keyboard is active; 1-64 characters.
is_persistent: Option<bool>true to always show the keyboard when the regular keyboard is hidden.
Implementations§
Source§impl ReplyKeyboardMarkup
impl ReplyKeyboardMarkup
Sourcepub fn new(keyboard: Vec<Vec<KeyboardButton>>) -> ReplyKeyboardMarkup
pub fn new(keyboard: Vec<Vec<KeyboardButton>>) -> ReplyKeyboardMarkup
Create a new reply keyboard from rows of buttons.
Sourcepub fn one_time(self) -> ReplyKeyboardMarkup
pub fn one_time(self) -> ReplyKeyboardMarkup
Make the keyboard disappear after a single press.
Sourcepub fn resize(self) -> ReplyKeyboardMarkup
pub fn resize(self) -> ReplyKeyboardMarkup
Request clients to resize the keyboard vertically for optimal fit.
Sourcepub fn persistent(self) -> ReplyKeyboardMarkup
pub fn persistent(self) -> ReplyKeyboardMarkup
Always show the keyboard when the regular keyboard is hidden.
Sourcepub fn placeholder(self, text: impl Into<String>) -> ReplyKeyboardMarkup
pub fn placeholder(self, text: impl Into<String>) -> ReplyKeyboardMarkup
Set a placeholder shown in the input field when the keyboard is active.
Sourcepub fn selective(self) -> ReplyKeyboardMarkup
pub fn selective(self) -> ReplyKeyboardMarkup
Show the keyboard to specific users only.
Trait Implementations§
Source§impl Clone for ReplyKeyboardMarkup
impl Clone for ReplyKeyboardMarkup
Source§fn clone(&self) -> ReplyKeyboardMarkup
fn clone(&self) -> ReplyKeyboardMarkup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more