Struct teloxide::dispatching::Dispatcher[][src]

pub struct Dispatcher<R> { /* fields omitted */ }

One dispatcher to rule them all.

See the module-level documentation for the design overview.

Implementations

impl<R> Dispatcher<R> where
    R: Send + 'static, 
[src]

#[must_use]pub fn new(requester: R) -> Self[src]

Constructs a new dispatcher with the specified requester.

#[must_use]pub fn messages_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, Message> + 'static + Send
[src]

#[must_use]pub fn edited_messages_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, Message> + 'static + Send
[src]

#[must_use]pub fn channel_posts_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, Message> + 'static + Send
[src]

#[must_use]pub fn edited_channel_posts_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, Message> + 'static + Send
[src]

#[must_use]pub fn inline_queries_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, InlineQuery> + 'static + Send
[src]

#[must_use]pub fn chosen_inline_results_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, ChosenInlineResult> + 'static + Send
[src]

#[must_use]pub fn callback_queries_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, CallbackQuery> + 'static + Send
[src]

#[must_use]pub fn shipping_queries_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, ShippingQuery> + 'static + Send
[src]

#[must_use]pub fn pre_checkout_queries_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, PreCheckoutQuery> + 'static + Send
[src]

#[must_use]pub fn polls_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, Poll> + 'static + Send
[src]

#[must_use]pub fn poll_answers_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, PollAnswer> + 'static + Send
[src]

#[must_use]pub fn my_chat_members_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, ChatMemberUpdated> + 'static + Send
[src]

#[must_use]pub fn chat_members_handler<H>(self, h: H) -> Self where
    H: DispatcherHandler<R, ChatMemberUpdated> + 'static + Send
[src]

pub async fn dispatch(&self) where
    R: Requester + Clone,
    <R as Requester>::GetUpdatesFaultTolerant: Send
[src]

Starts your bot with the default parameters.

The default parameters are a long polling update listener and log all errors produced by this listener).

pub async fn dispatch_with_listener<'a, UListener, ListenerE, Eh>(
    &'a self,
    update_listener: UListener,
    update_listener_error_handler: Arc<Eh>
) where
    UListener: UpdateListener<ListenerE> + 'a,
    Eh: ErrorHandler<ListenerE> + 'a,
    ListenerE: Debug,
    R: Requester + Clone
[src]

Starts your bot with custom update_listener and update_listener_error_handler.

Auto Trait Implementations

impl<R> !RefUnwindSafe for Dispatcher<R>

impl<R> Send for Dispatcher<R> where
    R: Send

impl<R> Sync for Dispatcher<R> where
    R: Send + Sync

impl<R> Unpin for Dispatcher<R> where
    R: Unpin

impl<R> !UnwindSafe for Dispatcher<R>

Blanket Implementations

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

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

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

impl<T> Conv for T

impl<T> Conv for T

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

type Remainder = Choices

impl<T> FmtForward for T

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

impl<T> Instrument for T[src]

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

impl<T, U, I> LiftInto<U, I> for T where
    U: LiftFrom<T, I>, 

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<Source> Sculptor<HNil, HNil> for Source

type Remainder = Source

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

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.