pub struct ClientBuilder<R, A>{ /* private fields */ }
Implementations§
Source§impl<R, A> ClientBuilder<R, A>
impl<R, A> ClientBuilder<R, A>
Sourcepub fn with_updates_sender(self, updates_sender: Sender<Box<Update>>) -> Self
pub fn with_updates_sender(self, updates_sender: Sender<Box<Update>>) -> Self
If you want to receive Telegram updates (messages, channels, etc; see crate::types::Update
),
you must set mpsc::Sender here.
Sourcepub fn with_auth_state_channel(self, channel_size: usize) -> Self
pub fn with_auth_state_channel(self, channel_size: usize) -> Self
If you want to receive all (AuthorizationState)[crate::types::authorization_state::AuthorizationState] changes you have to specify positive number of (channel)tokio::sync::mpsc::channel size. Channel will be used to send state changes.
Sourcepub fn with_tdlib_parameters(self, tdlib_parameters: TdlibParameters) -> Self
pub fn with_tdlib_parameters(self, tdlib_parameters: TdlibParameters) -> Self
Base parameters for your TDlib instance.
Sourcepub fn with_client_auth_state_handler<NA: ClientAuthStateHandler + Clone>(
self,
auth_handler: NA,
) -> ClientBuilder<R, NA>
pub fn with_client_auth_state_handler<NA: ClientAuthStateHandler + Clone>( self, auth_handler: NA, ) -> ClientBuilder<R, NA>
Use it to bound specific auth handler with a client.
pub fn build(self) -> Result<Client<R>>
Trait Implementations§
Source§impl<R, A> Debug for ClientBuilder<R, A>
impl<R, A> Debug for ClientBuilder<R, A>
Source§impl Default for ClientBuilder<TdJson, ConsoleClientStateHandler>
impl Default for ClientBuilder<TdJson, ConsoleClientStateHandler>
Auto Trait Implementations§
impl<R, A> Freeze for ClientBuilder<R, A>
impl<R, A> RefUnwindSafe for ClientBuilder<R, A>where
R: RefUnwindSafe,
A: RefUnwindSafe,
impl<R, A> Send for ClientBuilder<R, A>where
R: Send,
impl<R, A> Sync for ClientBuilder<R, A>where
R: Sync,
impl<R, A> Unpin for ClientBuilder<R, A>
impl<R, A> UnwindSafe for ClientBuilder<R, A>where
R: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more