Struct frankenstein::objects::InlineKeyboardButton
source · [−]pub struct InlineKeyboardButton {
pub text: String,
pub url: Option<String>,
pub login_url: Option<LoginUrl>,
pub callback_data: Option<String>,
pub web_app: Option<WebAppInfo>,
pub switch_inline_query: Option<String>,
pub switch_inline_query_current_chat: Option<String>,
pub callback_game: Option<CallbackGame>,
pub pay: Option<bool>,
}
Fields
text: String
url: Option<String>
login_url: Option<LoginUrl>
callback_data: Option<String>
web_app: Option<WebAppInfo>
switch_inline_query: Option<String>
switch_inline_query_current_chat: Option<String>
callback_game: Option<CallbackGame>
pay: Option<bool>
Implementations
sourceimpl InlineKeyboardButton
impl InlineKeyboardButton
sourcepub fn builder(
) -> InlineKeyboardButtonBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder(
) -> InlineKeyboardButtonBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building InlineKeyboardButton
.
On the builder, call .text(...)
, .url(...)
(optional), .login_url(...)
(optional), .callback_data(...)
(optional), .web_app(...)
(optional), .switch_inline_query(...)
(optional), .switch_inline_query_current_chat(...)
(optional), .callback_game(...)
(optional), .pay(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of InlineKeyboardButton
.
Trait Implementations
sourceimpl Clone for InlineKeyboardButton
impl Clone for InlineKeyboardButton
sourcefn clone(&self) -> InlineKeyboardButton
fn clone(&self) -> InlineKeyboardButton
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for InlineKeyboardButton
impl Debug for InlineKeyboardButton
sourceimpl<'de> Deserialize<'de> for InlineKeyboardButton
impl<'de> Deserialize<'de> for InlineKeyboardButton
sourcefn 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
sourceimpl PartialEq<InlineKeyboardButton> for InlineKeyboardButton
impl PartialEq<InlineKeyboardButton> for InlineKeyboardButton
sourcefn eq(&self, other: &InlineKeyboardButton) -> bool
fn eq(&self, other: &InlineKeyboardButton) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &InlineKeyboardButton) -> bool
fn ne(&self, other: &InlineKeyboardButton) -> bool
This method tests for !=
.
sourceimpl Serialize for InlineKeyboardButton
impl Serialize for InlineKeyboardButton
impl StructuralPartialEq for InlineKeyboardButton
Auto Trait Implementations
impl RefUnwindSafe for InlineKeyboardButton
impl Send for InlineKeyboardButton
impl Sync for InlineKeyboardButton
impl Unpin for InlineKeyboardButton
impl UnwindSafe for InlineKeyboardButton
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more