Struct libp2p::swarm::ConnectionCounters
source · pub struct ConnectionCounters { /* private fields */ }
Expand description
Network connection information.
Implementations§
source§impl ConnectionCounters
impl ConnectionCounters
sourcepub fn num_connections(&self) -> u32
pub fn num_connections(&self) -> u32
The total number of connections, both pending and established.
sourcepub fn num_pending(&self) -> u32
pub fn num_pending(&self) -> u32
The total number of pending connections, both incoming and outgoing.
sourcepub fn num_pending_incoming(&self) -> u32
pub fn num_pending_incoming(&self) -> u32
The number of incoming connections being established.
sourcepub fn num_pending_outgoing(&self) -> u32
pub fn num_pending_outgoing(&self) -> u32
The number of outgoing connections being established.
sourcepub fn num_established_incoming(&self) -> u32
pub fn num_established_incoming(&self) -> u32
The number of established incoming connections.
sourcepub fn num_established_outgoing(&self) -> u32
pub fn num_established_outgoing(&self) -> u32
The number of established outgoing connections.
sourcepub fn num_established(&self) -> u32
pub fn num_established(&self) -> u32
The total number of established connections.
Trait Implementations§
source§impl Clone for ConnectionCounters
impl Clone for ConnectionCounters
source§fn clone(&self) -> ConnectionCounters
fn clone(&self) -> ConnectionCounters
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 moreAuto Trait Implementations§
impl Freeze for ConnectionCounters
impl RefUnwindSafe for ConnectionCounters
impl Send for ConnectionCounters
impl Sync for ConnectionCounters
impl Unpin for ConnectionCounters
impl UnwindSafe for ConnectionCounters
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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