pub enum NetworkState {
    Connected,
    Disconnected,
    Connecting,
}
Expand description

The state of the connector. This is based on when the last ping was send or received. Changing your ConnectorParam will greatly affect the results of Connector.state(), returning this value.

Variants

Connected

We received a ping a reasonable amount of time ago, so we’re connected. See ConnectorParam::PING_INTERVAL_S for more info.

Disconnected

We have not received a ping for a while, and we are not connecting at this point in time. See ConnectorParam::RECEIVE_PING_TIMEOUT_S for more info.

Connecting

We have not received a ping for a while but we did try to connect. See ConnectorParam::SEND_PING_TIMEOUT_S for more info.

Trait Implementations

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.