[−][src]Enum rtdlib::types::ConnectionState
Describes the current state of the connection to Telegram servers
Variants
Connecting(ConnectionStateConnecting)
Currently establishing a connection to the Telegram servers
ConnectingToProxy(ConnectionStateConnectingToProxy)
Currently establishing a connection with a proxy server
Ready(ConnectionStateReady)
There is a working connection to the Telegram servers
Updating(ConnectionStateUpdating)
Downloading data received while the client was offline
WaitingForNetwork(ConnectionStateWaitingForNetwork)
Currently waiting for the network to become available. Use setNetworkType to change the available network type
Implementations
impl ConnectionState
[src]
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
[src]
pub fn is_connecting(&self) -> bool
[src]
pub fn is_connecting_to_proxy(&self) -> bool
[src]
pub fn is_ready(&self) -> bool
[src]
pub fn is_updating(&self) -> bool
[src]
pub fn is_waiting_for_network(&self) -> bool
[src]
pub fn on_connecting<F: FnOnce(&ConnectionStateConnecting)>(
&self,
fnc: F
) -> &Self
[src]
&self,
fnc: F
) -> &Self
pub fn on_connecting_to_proxy<F: FnOnce(&ConnectionStateConnectingToProxy)>(
&self,
fnc: F
) -> &Self
[src]
&self,
fnc: F
) -> &Self
pub fn on_ready<F: FnOnce(&ConnectionStateReady)>(&self, fnc: F) -> &Self
[src]
pub fn on_updating<F: FnOnce(&ConnectionStateUpdating)>(&self, fnc: F) -> &Self
[src]
pub fn on_waiting_for_network<F: FnOnce(&ConnectionStateWaitingForNetwork)>(
&self,
fnc: F
) -> &Self
[src]
&self,
fnc: F
) -> &Self
pub fn as_connecting(&self) -> Option<&ConnectionStateConnecting>
[src]
pub fn as_connecting_to_proxy(
&self
) -> Option<&ConnectionStateConnectingToProxy>
[src]
&self
) -> Option<&ConnectionStateConnectingToProxy>
pub fn as_ready(&self) -> Option<&ConnectionStateReady>
[src]
pub fn as_updating(&self) -> Option<&ConnectionStateUpdating>
[src]
pub fn as_waiting_for_network(
&self
) -> Option<&ConnectionStateWaitingForNetwork>
[src]
&self
) -> Option<&ConnectionStateWaitingForNetwork>
pub fn connecting<T: AsRef<ConnectionStateConnecting>>(t: T) -> Self
[src]
pub fn connecting_to_proxy<T: AsRef<ConnectionStateConnectingToProxy>>(
t: T
) -> Self
[src]
t: T
) -> Self
pub fn ready<T: AsRef<ConnectionStateReady>>(t: T) -> Self
[src]
pub fn updating<T: AsRef<ConnectionStateUpdating>>(t: T) -> Self
[src]
pub fn waiting_for_network<T: AsRef<ConnectionStateWaitingForNetwork>>(
t: T
) -> Self
[src]
t: T
) -> Self
Trait Implementations
impl AsRef<ConnectionState> for ConnectionState
[src]
fn as_ref(&self) -> &ConnectionState
[src]
impl Clone for ConnectionState
[src]
fn clone(&self) -> ConnectionState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ConnectionState
[src]
impl Default for ConnectionState
[src]
impl<'de> Deserialize<'de> for ConnectionState
[src]
fn deserialize<D>(deserializer: D) -> Result<ConnectionState, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl RObject for ConnectionState
[src]
impl Serialize for ConnectionState
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConnectionState
impl Send for ConnectionState
impl Sync for ConnectionState
impl Unpin for ConnectionState
impl UnwindSafe for ConnectionState
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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.
fn to_owned(&self) -> T
[src]
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.
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>,