pub struct ConnectionStats {
pub connections_established: u64,
pub connections_closed: u64,
pub active_connections: usize,
pub connection_errors: u64,
pub messages_sent: u64,
pub bytes_sent: u64,
}quic only.Expand description
Statistics for the connection manager.
§Note on Accuracy
active_connections is a point-in-time snapshot taken when stats() is called.
It may be stale by the time you read it due to concurrent connection changes.
The atomic counters (connections_established, messages_sent, etc.) are eventually
consistent but may show temporary inconsistencies under high concurrency.
For monitoring purposes, these values are suitable for dashboards and alerts. For precise connection limiting, the internal semaphore provides strict enforcement.
Fields§
§connections_established: u64Total connections established (monotonically increasing).
connections_closed: u64Total connections closed (monotonically increasing).
active_connections: usizeCurrent active connections (approximate snapshot, may be stale).
connection_errors: u64Connection errors encountered (monotonically increasing).
messages_sent: u64Messages sent (monotonically increasing).
bytes_sent: u64Bytes sent (monotonically increasing).
Trait Implementations§
Source§impl Clone for ConnectionStats
impl Clone for ConnectionStats
Source§fn clone(&self) -> ConnectionStats
fn clone(&self) -> ConnectionStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectionStats
impl Debug for ConnectionStats
Source§impl Default for ConnectionStats
impl Default for ConnectionStats
Source§fn default() -> ConnectionStats
fn default() -> ConnectionStats
Auto Trait Implementations§
impl Freeze for ConnectionStats
impl RefUnwindSafe for ConnectionStats
impl Send for ConnectionStats
impl Sync for ConnectionStats
impl Unpin for ConnectionStats
impl UnwindSafe for ConnectionStats
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
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> ⓘ
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> ⓘ
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