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
sourceimpl<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
sourceimpl<A: Debug, T: Debug> Debug for WorkerBuilder<A, T> where
A: AuthStateHandler + Send + Sync + 'static,
T: TdLibClient + Send + Sync + Clone + 'static,
impl<A: Debug, T: Debug> Debug for WorkerBuilder<A, T> where
A: AuthStateHandler + Send + Sync + 'static,
T: TdLibClient + Send + Sync + Clone + 'static,
sourceimpl Default for WorkerBuilder<ConsoleAuthStateHandler, TdJson>
impl Default for WorkerBuilder<ConsoleAuthStateHandler, TdJson>
sourcefn default() -> Self
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more