Struct tg_flows::InlineKeyboardMarkup
source · pub struct InlineKeyboardMarkup {
pub inline_keyboard: Vec<Vec<InlineKeyboardButton>>,
}Expand description
This object represents an inline keyboard that appears right next to the message it belongs to.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
Fields§
§inline_keyboard: Vec<Vec<InlineKeyboardButton>>Array of button rows, each represented by an array of
InlineKeyboardButton objects.
Implementations§
source§impl InlineKeyboardMarkup
impl InlineKeyboardMarkup
Build InlineKeyboardMarkup.
Examples
use teloxide_core::types::{InlineKeyboardButton, InlineKeyboardMarkup};
let url = url::Url::parse("https://example.com").unwrap();
let url_button = InlineKeyboardButton::url("text".to_string(), url);
let keyboard = InlineKeyboardMarkup::default().append_row(vec![url_button]);pub fn new<I>(inline_keyboard: I) -> Selfwhere I: IntoIterator, I::Item: IntoIterator<Item = InlineKeyboardButton>,
pub fn inline_keyboard<I>(self, val: I) -> Selfwhere I: IntoIterator, I::Item: IntoIterator<Item = InlineKeyboardButton>,
pub fn append_row<R>(self, buttons: R) -> Selfwhere R: IntoIterator<Item = InlineKeyboardButton>,
pub fn append_to_row(self, index: usize, button: InlineKeyboardButton) -> Self
Trait Implementations§
source§impl Clone for InlineKeyboardMarkup
impl Clone for InlineKeyboardMarkup
source§fn clone(&self) -> InlineKeyboardMarkup
fn clone(&self) -> InlineKeyboardMarkup
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 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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<InlineKeyboardMarkup> for ReplyMarkup
impl From<InlineKeyboardMarkup> for ReplyMarkup
source§fn from(original: InlineKeyboardMarkup) -> ReplyMarkup
fn from(original: InlineKeyboardMarkup) -> ReplyMarkup
Converts to this type from the input type.
source§impl Hash for InlineKeyboardMarkup
impl Hash for InlineKeyboardMarkup
source§impl PartialEq<InlineKeyboardMarkup> for InlineKeyboardMarkup
impl PartialEq<InlineKeyboardMarkup> for InlineKeyboardMarkup
source§fn eq(&self, other: &InlineKeyboardMarkup) -> bool
fn eq(&self, other: &InlineKeyboardMarkup) -> bool
This method tests for
self and other values to be equal, and is used
by ==.