Enum rtdlib::types::ConnectionState [−][src]
pub enum ConnectionState {
Connecting(ConnectionStateConnecting),
ConnectingToProxy(ConnectionStateConnectingToProxy),
Ready(ConnectionStateReady),
Updating(ConnectionStateUpdating),
WaitingForNetwork(ConnectionStateWaitingForNetwork),
// some variants omitted
}
Expand description
Describes the current state of the connection to Telegram servers
Variants
Currently establishing a connection to the Telegram servers
Tuple Fields of Connecting
Currently establishing a connection with a proxy server
Tuple Fields of ConnectingToProxy
There is a working connection to the Telegram servers
Tuple Fields of Ready
Downloading data received while the client was offline
Tuple Fields of Updating
Currently waiting for the network to become available. Use setNetworkType to change the available network type
Tuple Fields of WaitingForNetwork
Implementations
pub fn on_connecting_to_proxy<F: FnOnce(&ConnectionStateConnectingToProxy)>(
&self,
fnc: F
) -> &Self
pub fn on_waiting_for_network<F: FnOnce(&ConnectionStateWaitingForNetwork)>(
&self,
fnc: F
) -> &Self
Trait Implementations
Performs the conversion.
fn deserialize<D>(deserializer: D) -> Result<ConnectionState, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<ConnectionState, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more