pub struct WorkerBuilder<A, T>where
    A: AuthStateHandler + Send + Sync + 'static,
    T: TdLibClient + Send + Sync + Clone + 'static,{ /* private fields */ }

Implementations§

source§

impl<A, T> WorkerBuilder<A, T>where A: AuthStateHandler + Send + Sync + 'static, T: TdLibClient + Send + Sync + Clone + 'static,

source

pub fn with_channels_send_timeout(self, timeout: f64) -> Self

Specifies timeout which will be used during sending to tokio::sync::mpsc.

source

pub fn with_read_updates_timeout(self, read_updates_timeout: f64) -> Self

source

pub fn with_auth_state_handler<N>( self, auth_state_handler: N ) -> WorkerBuilder<N, T>where N: AuthStateHandler + Send + Sync + 'static,

AuthStateHandler allows you to handle particular “auth states”, such as WaitPassword, WaitPhoneNumber and so on. See AuthorizationState.

source

pub fn build(self) -> Result<Worker<A, T>>

Trait Implementations§

source§

impl<A, T> Debug for WorkerBuilder<A, T>where A: AuthStateHandler + Send + Sync + 'static + Debug, T: TdLibClient + Send + Sync + Clone + 'static + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WorkerBuilder<ConsoleAuthStateHandler, TdJson>

source§

fn default() -> Self

Provides default implementation with ConsoleAuthStateHandler

Auto Trait Implementations§

§

impl<A, T> RefUnwindSafe for WorkerBuilder<A, T>where A: RefUnwindSafe, T: RefUnwindSafe,

§

impl<A, T> Send for WorkerBuilder<A, T>

§

impl<A, T> Sync for WorkerBuilder<A, T>

§

impl<A, T> Unpin for WorkerBuilder<A, T>where A: Unpin, T: Unpin,

§

impl<A, T> UnwindSafe for WorkerBuilder<A, T>where A: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.