Enum distant_net::client::ConnectionState
source · pub enum ConnectionState {
Reconnecting,
Connected,
Disconnected,
}Expand description
Represents the state of a connection.
Variants
Reconnecting
Connection is not active, but currently going through reconnection process.
Connected
Connection is active.
Disconnected
Connection is not active.
Implementations
sourceimpl ConnectionState
impl ConnectionState
sourcepub fn is_reconnecting(&self) -> bool
pub fn is_reconnecting(&self) -> bool
Returns true if reconnecting.
sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Returns true if connected.
sourcepub fn is_disconnected(&self) -> bool
pub fn is_disconnected(&self) -> bool
Returns true if disconnected.
Trait Implementations
sourceimpl Clone for ConnectionState
impl Clone for ConnectionState
sourcefn clone(&self) -> ConnectionState
fn clone(&self) -> ConnectionState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ConnectionState
impl Debug for ConnectionState
sourceimpl Display for ConnectionState
impl Display for ConnectionState
sourceimpl PartialEq<ConnectionState> for ConnectionState
impl PartialEq<ConnectionState> for ConnectionState
sourcefn eq(&self, other: &ConnectionState) -> bool
fn eq(&self, other: &ConnectionState) -> bool
impl Copy for ConnectionState
impl Eq for ConnectionState
impl StructuralEq for ConnectionState
impl StructuralPartialEq for ConnectionState
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
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