Enum tbot::types::parameters::CallbackAction
source · Expand description
Represent possible actions for AnswerCallbackQuery
.
Though you can consturct variants directly, there are convenient methods
to do that: with_notification
, with_alert
and with_url
.
Variants§
Text(String, bool)
Show text to the user. The last item configures show_alert
.
Url(String)
Open a URL.
Implementations§
source§impl CallbackAction
impl CallbackAction
source§impl CallbackAction
impl CallbackAction
sourcepub fn with_notification(text: impl Into<String>) -> Self
pub fn with_notification(text: impl Into<String>) -> Self
Constructs the Text
variant that shows a simple notification.
sourcepub fn with_alert(text: impl Into<String>) -> Self
pub fn with_alert(text: impl Into<String>) -> Self
Constructs the Text
variant that shows an alert.
Trait Implementations§
source§impl Clone for CallbackAction
impl Clone for CallbackAction
source§fn clone(&self) -> CallbackAction
fn clone(&self) -> CallbackAction
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 CallbackAction
impl Debug for CallbackAction
source§impl Hash for CallbackAction
impl Hash for CallbackAction
source§impl PartialEq<CallbackAction> for CallbackAction
impl PartialEq<CallbackAction> for CallbackAction
source§fn eq(&self, other: &CallbackAction) -> bool
fn eq(&self, other: &CallbackAction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.