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
Build 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) -> Self
pub fn inline_keyboard<I>(self, val: I) -> Self
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 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<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 for InlineKeyboardMarkup
impl PartialEq for InlineKeyboardMarkup
Source§impl Serialize for InlineKeyboardMarkup
impl Serialize for InlineKeyboardMarkup
impl Eq for InlineKeyboardMarkup
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
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