Enum udp_connector::NetworkState
source · 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
sourceimpl Debug for NetworkState
impl Debug for NetworkState
sourceimpl PartialEq<NetworkState> for NetworkState
impl PartialEq<NetworkState> for NetworkState
sourcefn eq(&self, other: &NetworkState) -> bool
fn eq(&self, other: &NetworkState) -> bool
impl Eq for NetworkState
impl StructuralEq for NetworkState
impl StructuralPartialEq for NetworkState
Auto Trait Implementations
impl RefUnwindSafe for NetworkState
impl Send for NetworkState
impl Sync for NetworkState
impl Unpin for NetworkState
impl UnwindSafe for NetworkState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more