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§
Source§impl Debug for NetworkState
impl Debug for NetworkState
Source§impl PartialEq for NetworkState
impl PartialEq for NetworkState
impl Eq for NetworkState
impl StructuralPartialEq for NetworkState
Auto Trait Implementations§
impl Freeze for NetworkState
impl RefUnwindSafe for NetworkState
impl Send for NetworkState
impl Sync for NetworkState
impl Unpin for NetworkState
impl UnwindSafe for NetworkState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more