Struct rust_tdlib::client::worker::Worker[][src]

pub struct Worker<A, S> where
    A: AuthStateHandler + Send + Sync + 'static,
    S: TdLibClient + Send + Sync + Clone + 'static, 
{ /* fields omitted */ }
Expand description

The main object in all interactions. You have to [start](crate::client::worker::Worker::start] worker and bind each client with worker using auth_client.

Implementations

Binds client with worker and runs authorization routines. Method returns error if worker is not running.

Determines that the worker is running.

Starts interaction with TDLib. It returns JoinHandle which allows you to handle worker state.

Stops the client. You may want to await JoinHandle retrieved with client.start().await after stopping the client.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.