[][src]Trait tbot::contexts::traits::Callback

pub trait Callback<'a, C: 'static>: Sealed {
    fn answer(
        &'a self,
        action: CallbackAction<'a>
    ) -> AnswerCallbackQuery<'a, C> { ... }
fn ignore(&'a self) -> AnswerCallbackQuery<'a, C> { ... }
fn open_url(&'a self, url: &'a str) -> AnswerCallbackQuery<'a, C> { ... }
fn notify(&'a self, text: &'a str) -> AnswerCallbackQuery<'a, C> { ... }
fn alert(&'a self, text: &'a str) -> AnswerCallbackQuery<'a, C> { ... } }

Provides methods appliable to callback queries.

Provided methods

fn answer(&'a self, action: CallbackAction<'a>) -> AnswerCallbackQuery<'a, C>

Answers the callback query.

If you don't need to choose the action dynamically, using dedicated methods will be more convenient: ignore, open_url, notify and alert.

fn ignore(&'a self) -> AnswerCallbackQuery<'a, C>

Answers the query without any action.

fn open_url(&'a self, url: &'a str) -> AnswerCallbackQuery<'a, C>

Opens a URL.

fn notify(&'a self, text: &'a str) -> AnswerCallbackQuery<'a, C>

Shows a notification to the user.

fn alert(&'a self, text: &'a str) -> AnswerCallbackQuery<'a, C>

Shows an alert to the user.

Loading content...

Implementors

impl<'a, C: 'static> Callback<'a, C> for DataCallback<C>[src]

impl<'a, C: 'static> Callback<'a, C> for GameCallback<C>[src]

Loading content...