#[non_exhaustive]pub struct InlineKeyboardMarkup {
pub inline_keyboard: Vec<Vec<InlineKeyboardButton>>,
}Expand description
An inline keyboard that appears right next to the message it belongs to.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.inline_keyboard: Vec<Vec<InlineKeyboardButton>>Array of button rows, each represented by an array of InlineKeyboardButton objects.
Implementations§
Source§impl InlineKeyboardMarkup
impl InlineKeyboardMarkup
Sourcepub fn new(rows: Vec<Vec<InlineKeyboardButton>>) -> InlineKeyboardMarkup
pub fn new(rows: Vec<Vec<InlineKeyboardButton>>) -> InlineKeyboardMarkup
Create a new inline keyboard from rows of buttons.
Create an inline keyboard with a single button.
Sourcepub fn from_row(buttons: Vec<InlineKeyboardButton>) -> InlineKeyboardMarkup
pub fn from_row(buttons: Vec<InlineKeyboardButton>) -> InlineKeyboardMarkup
Create an inline keyboard with a single row of buttons.
Sourcepub fn from_column(buttons: Vec<InlineKeyboardButton>) -> InlineKeyboardMarkup
pub fn from_column(buttons: Vec<InlineKeyboardButton>) -> InlineKeyboardMarkup
Create an inline keyboard where each button is on its own row (vertical layout).
Trait Implementations§
Source§impl Clone for InlineKeyboardMarkup
impl Clone for InlineKeyboardMarkup
Source§fn clone(&self) -> InlineKeyboardMarkup
fn clone(&self) -> InlineKeyboardMarkup
Returns a duplicate 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 InlineKeyboardMarkup
impl Debug for InlineKeyboardMarkup
Source§impl Default for InlineKeyboardMarkup
impl Default for InlineKeyboardMarkup
Source§fn default() -> InlineKeyboardMarkup
fn default() -> InlineKeyboardMarkup
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InlineKeyboardMarkup
impl<'de> Deserialize<'de> for InlineKeyboardMarkup
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InlineKeyboardMarkup, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InlineKeyboardMarkup, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InlineKeyboardMarkup
impl PartialEq for InlineKeyboardMarkup
Source§impl Serialize for InlineKeyboardMarkup
impl Serialize for InlineKeyboardMarkup
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
impl StructuralPartialEq for InlineKeyboardMarkup
Auto Trait Implementations§
impl Freeze for InlineKeyboardMarkup
impl RefUnwindSafe for InlineKeyboardMarkup
impl Send for InlineKeyboardMarkup
impl Sync for InlineKeyboardMarkup
impl Unpin for InlineKeyboardMarkup
impl UnsafeUnpin for InlineKeyboardMarkup
impl UnwindSafe for InlineKeyboardMarkup
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