Struct rust_tdlib::client::worker::WorkerBuilder
source · 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,
impl<A, T> WorkerBuilder<A, T>where A: AuthStateHandler + Send + Sync + 'static, T: TdLibClient + Send + Sync + Clone + 'static,
sourcepub fn with_channels_send_timeout(self, timeout: f64) -> Self
pub fn with_channels_send_timeout(self, timeout: f64) -> Self
Specifies timeout which will be used during sending to tokio::sync::mpsc.
pub fn with_read_updates_timeout(self, read_updates_timeout: f64) -> Self
sourcepub fn with_auth_state_handler<N>(
self,
auth_state_handler: N
) -> WorkerBuilder<N, T>where
N: AuthStateHandler + Send + Sync + 'static,
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.
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,
impl<A, T> Debug for WorkerBuilder<A, T>where A: AuthStateHandler + Send + Sync + 'static + Debug, T: TdLibClient + Send + Sync + Clone + 'static + Debug,
source§impl Default for WorkerBuilder<ConsoleAuthStateHandler, TdJson>
impl Default for WorkerBuilder<ConsoleAuthStateHandler, TdJson>
source§fn default() -> Self
fn default() -> Self
Provides default implementation with ConsoleAuthStateHandler