[][src]Struct tgbot::longpoll::LongPoll

pub struct LongPoll<H> { /* fields omitted */ }

Receive incoming updates using long polling

Methods

impl<H> LongPoll<H>[src]

pub fn new(api: Api, handler: H) -> Self[src]

Creates a new LongPoll

Arguments

  • api - Telegram Bot API Client
  • handler - Updates Handler

pub fn options(self, options: LongPollOptions) -> Self[src]

Set poll options

impl<H> LongPoll<H> where
    H: UpdateHandler + Send
[src]

pub fn get_handle(&self) -> LongPollHandle[src]

Returns a long poll handle

pub async fn run(__arg0: Self)[src]

Start polling loop

Auto Trait Implementations

impl<H> !RefUnwindSafe for LongPoll<H>

impl<H> Send for LongPoll<H> where
    H: Send

impl<H> Sync for LongPoll<H> where
    H: Sync

impl<H> Unpin for LongPoll<H>

impl<H> !UnwindSafe for LongPoll<H>

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> 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.