Struct rust_tdlib::client::ClientBuilder
source · [−]pub struct ClientBuilder<R> where
R: TdLibClient + Clone, { /* private fields */ }
Implementations
sourceimpl<R> ClientBuilder<R> where
R: TdLibClient + Clone,
impl<R> ClientBuilder<R> where
R: TdLibClient + Clone,
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.
pub fn build(self) -> Result<Client<R>>
Trait Implementations
sourceimpl<R: Debug> Debug for ClientBuilder<R> where
R: TdLibClient + Clone,
impl<R: Debug> Debug for ClientBuilder<R> where
R: TdLibClient + Clone,
Auto Trait Implementations
impl<R> !RefUnwindSafe for ClientBuilder<R>
impl<R> Send for ClientBuilder<R> where
R: Send,
impl<R> Sync for ClientBuilder<R> where
R: Sync,
impl<R> Unpin for ClientBuilder<R> where
R: Unpin,
impl<R> !UnwindSafe for ClientBuilder<R>
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