[−][src]Enum tbot::types::message::inline_markup::ButtonKind
Represents different types an inline button can be.
Complete descriptions can be found in Bots API docs.
Variants (Non-exhaustive)
Url(String)
Represents a URL button.
CallbackData(String)
Represents callback data.
SwitchInlineQuery(String)
Represents query inserted when switched to inline.
SwitchInlineQueryCurrentChat(String)
Represents query inserted when switched to inline in the curent chat.
CallbackGame(Game)
Represent a description of the game to be laucnhed.
Pay(bool)
if true
, a pay button.
Implementations
impl ButtonKind
[src]
pub fn is_url(&self) -> bool
[src]
Returns true
if self
is of variant Url
.
pub fn expect_url(self) -> String where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Url
.
Panics
Panics if the value is not Url
, with a panic message including the content of self
.
pub fn url(self) -> Option<String>
[src]
Returns Some
if self
is of variant Url
, and None
otherwise.
pub fn is_callback_data(&self) -> bool
[src]
Returns true
if self
is of variant CallbackData
.
pub fn expect_callback_data(self) -> String where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of CallbackData
.
Panics
Panics if the value is not CallbackData
, with a panic message including the content of self
.
pub fn callback_data(self) -> Option<String>
[src]
Returns Some
if self
is of variant CallbackData
, and None
otherwise.
pub fn is_switch_inline_query(&self) -> bool
[src]
Returns true
if self
is of variant SwitchInlineQuery
.
pub fn expect_switch_inline_query(self) -> String where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of SwitchInlineQuery
.
Panics
Panics if the value is not SwitchInlineQuery
, with a panic message including the content of self
.
pub fn switch_inline_query(self) -> Option<String>
[src]
Returns Some
if self
is of variant SwitchInlineQuery
, and None
otherwise.
pub fn is_switch_inline_query_current_chat(&self) -> bool
[src]
Returns true
if self
is of variant SwitchInlineQueryCurrentChat
.
pub fn expect_switch_inline_query_current_chat(self) -> String where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of SwitchInlineQueryCurrentChat
.
Panics
Panics if the value is not SwitchInlineQueryCurrentChat
, with a panic message including the content of self
.
pub fn switch_inline_query_current_chat(self) -> Option<String>
[src]
Returns Some
if self
is of variant SwitchInlineQueryCurrentChat
, and None
otherwise.
pub fn is_callback_game(&self) -> bool
[src]
Returns true
if self
is of variant CallbackGame
.
pub fn expect_callback_game(self) -> Game where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of CallbackGame
.
Panics
Panics if the value is not CallbackGame
, with a panic message including the content of self
.
pub fn callback_game(self) -> Option<Game>
[src]
Returns Some
if self
is of variant CallbackGame
, and None
otherwise.
pub fn is_pay(&self) -> bool
[src]
Returns true
if self
is of variant Pay
.
pub fn expect_pay(self) -> bool where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Pay
.
Panics
Panics if the value is not Pay
, with a panic message including the content of self
.
pub fn pay(self) -> Option<bool>
[src]
Returns Some
if self
is of variant Pay
, and None
otherwise.
Trait Implementations
impl Clone for ButtonKind
[src]
fn clone(&self) -> ButtonKind
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ButtonKind
[src]
impl Eq for ButtonKind
[src]
impl Hash for ButtonKind
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ButtonKind> for ButtonKind
[src]
fn eq(&self, other: &ButtonKind) -> bool
[src]
fn ne(&self, other: &ButtonKind) -> bool
[src]
impl StructuralEq for ButtonKind
[src]
impl StructuralPartialEq for ButtonKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for ButtonKind
impl Send for ButtonKind
impl Sync for ButtonKind
impl Unpin for ButtonKind
impl UnwindSafe for ButtonKind
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,