[−][src]Struct rust_tdlib::client::client::Client
A high-level abstraction of TDLib.
Before start any API interactions you must call start().await
.
Implementations
impl Client<ConsoleAuthStateHandler, RawApi>
[src]
pub fn builder() -> ClientBuilder<ConsoleAuthStateHandler>
[src]
impl<A, S> Client<A, S> where
A: AuthStateHandler + Send + Sync + 'static,
S: TdLibClient + Send + Sync + Clone + 'static,
[src]
A: AuthStateHandler + Send + Sync + 'static,
S: TdLibClient + Send + Sync + Clone + 'static,
pub fn api(&self) -> &Api<S>
[src]
Returns instance of Api. Api implements all TDlib API-methods, such as "search_public_chat", "send_message" and so on.
pub async fn start(&mut self) -> Result<JoinHandle<ClientState>, RTDError>
[src]
Starts interaction with TDLib. Method blocks until authorization performed. It returns JoinHandle which allows you to handle client state.
pub fn stop(&self)
[src]
Stops the client.
You may want to await JoinHandle retrieved with client.start().await
after stopping the client.
Trait Implementations
impl<A: Clone, S: Clone> Clone for Client<A, S> where
A: AuthStateHandler + Send + Sync + 'static,
S: TdLibClient + Send + Sync + Clone + 'static,
[src]
A: AuthStateHandler + Send + Sync + 'static,
S: TdLibClient + Send + Sync + Clone + 'static,
impl<A: Debug, S: Debug> Debug for Client<A, S> where
A: AuthStateHandler + Send + Sync + 'static,
S: TdLibClient + Send + Sync + Clone + 'static,
[src]
A: AuthStateHandler + Send + Sync + 'static,
S: TdLibClient + Send + Sync + Clone + 'static,
Auto Trait Implementations
impl<A, S> !RefUnwindSafe for Client<A, S>
[src]
impl<A, S> Send for Client<A, S>
[src]
impl<A, S> Sync for Client<A, S>
[src]
impl<A, S> Unpin for Client<A, S> where
S: Unpin,
[src]
S: Unpin,
impl<A, S> !UnwindSafe for Client<A, S>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,