#[repr(u8)]pub enum Connectedness {
NotConnected = 0,
Connected = 1,
CanConnect = 2,
CannotConnect = 3,
Limited = 4,
}
Expand description
Represents the connectivity state of a peer in a network, indicating the reachability and interaction status of a node with its peers.
Variants§
NotConnected = 0
No current connection to the peer, and no recent history of a successful connection.
Connected = 1
An active, open connection to the peer exists.
CanConnect = 2
Connection to the peer is possible but not currently established; usually implies a past successful connection.
CannotConnect = 3
Recent attempts to connect to the peer failed, indicating potential issues in reachability or peer status.
Limited = 4
Connection to the peer is limited; may not have full capabilities.
Trait Implementations§
Source§impl Clone for Connectedness
impl Clone for Connectedness
Source§fn clone(&self) -> Connectedness
fn clone(&self) -> Connectedness
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Connectedness
impl Debug for Connectedness
Source§impl Default for Connectedness
impl Default for Connectedness
Source§fn default() -> Connectedness
fn default() -> Connectedness
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Connectedness
impl<'de> Deserialize<'de> for Connectedness
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Connectedness
impl Display for Connectedness
Source§impl From<u8> for Connectedness
impl From<u8> for Connectedness
Source§impl PartialEq for Connectedness
impl PartialEq for Connectedness
Source§impl Serialize for Connectedness
impl Serialize for Connectedness
impl Copy for Connectedness
impl StructuralPartialEq for Connectedness
Auto Trait Implementations§
impl Freeze for Connectedness
impl RefUnwindSafe for Connectedness
impl Send for Connectedness
impl Sync for Connectedness
impl Unpin for Connectedness
impl UnwindSafe for Connectedness
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more