#[non_exhaustive]
pub enum Any {
Inline(Keyboard),
Reply(Keyboard),
RemoveReply(Remove),
ForceReply(ForceReply),
}
Expand description
An enum of possible keyboards.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Inline(Keyboard)
An inline keyboard.
Reply(Keyboard)
A reply markup.
RemoveReply(Remove)
Removes reply markup.
ForceReply(ForceReply)
Forces reply.
Implementations§
source§impl Any
impl Any
sourcepub fn expect_inline(self) -> Keyboardwhere
Self: Debug,
pub fn expect_inline(self) -> Keyboardwhere
Self: Debug,
sourcepub fn inline(self) -> Option<Keyboard>
pub fn inline(self) -> Option<Keyboard>
Returns Some
if self
is of variant Inline
, and None
otherwise.
sourcepub fn expect_reply(self) -> Keyboardwhere
Self: Debug,
pub fn expect_reply(self) -> Keyboardwhere
Self: Debug,
sourcepub fn reply(self) -> Option<Keyboard>
pub fn reply(self) -> Option<Keyboard>
Returns Some
if self
is of variant Reply
, and None
otherwise.
sourcepub fn is_remove_reply(&self) -> bool
pub fn is_remove_reply(&self) -> bool
Returns true
if self
is of variant RemoveReply
.
sourcepub fn expect_remove_reply(self) -> Removewhere
Self: Debug,
pub fn expect_remove_reply(self) -> Removewhere
Self: Debug,
Unwraps the value, yielding the content of RemoveReply
.
Panics
Panics if the value is not RemoveReply
, with a panic message including the content of self
.
sourcepub fn remove_reply(self) -> Option<Remove>
pub fn remove_reply(self) -> Option<Remove>
Returns Some
if self
is of variant RemoveReply
, and None
otherwise.
sourcepub fn is_force_reply(&self) -> bool
pub fn is_force_reply(&self) -> bool
Returns true
if self
is of variant ForceReply
.
sourcepub fn expect_force_reply(self) -> ForceReplywhere
Self: Debug,
pub fn expect_force_reply(self) -> ForceReplywhere
Self: Debug,
Unwraps the value, yielding the content of ForceReply
.
Panics
Panics if the value is not ForceReply
, with a panic message including the content of self
.
sourcepub fn force_reply(self) -> Option<ForceReply>
pub fn force_reply(self) -> Option<ForceReply>
Returns Some
if self
is of variant ForceReply
, and None
otherwise.
Trait Implementations§
source§impl From<ForceReply> for Any
impl From<ForceReply> for Any
source§fn from(keyboard: ForceReply) -> Self
fn from(keyboard: ForceReply) -> Self
Converts to this type from the input type.