[][src]Enum tbot::types::parameters::CallbackAction

pub enum CallbackAction<'a> {
    None,
    Text(&'a strbool),
    Url(&'a str),
}

Represent possible actions for AnswerCallbackQuery.

Though you can consturct variants directly, there are convenient methods to do that: none, notification, alert, url.

Variants

None

No action.

Text(&'a strbool)

Show text to the user. The last item configures show_alert.

Url(&'a str)

Open a URL.

Methods

impl<'a> CallbackAction<'a>[src]

pub const fn none() -> Self[src]

Constructs the None variant.

pub fn notification(text: &'a str) -> Self[src]

Constructs the Text variant that shows a simple notification.

pub fn alert(text: &'a str) -> Self[src]

Constructs the Text variant that shows an alert.

pub fn url(url: &'a str) -> Self[src]

Constructs the Url variant.

Trait Implementations

impl<'a> PartialEq<CallbackAction<'a>> for CallbackAction<'a>[src]

impl<'a> Copy for CallbackAction<'a>[src]

impl<'a> Eq for CallbackAction<'a>[src]

impl<'a> Clone for CallbackAction<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Hash for CallbackAction<'a>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> Debug for CallbackAction<'a>[src]

Auto Trait Implementations

impl<'a> Send for CallbackAction<'a>

impl<'a> Unpin for CallbackAction<'a>

impl<'a> Sync for CallbackAction<'a>

impl<'a> UnwindSafe for CallbackAction<'a>

impl<'a> RefUnwindSafe for CallbackAction<'a>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T