pub struct ConnectionHealth {
pub rtt_ms: u32,
pub rtt_variance_ms: u32,
pub packet_loss_percent: u8,
pub state: ConnectionState,
pub last_activity: Instant,
}Expand description
Connection health metrics
Fields§
§rtt_ms: u32Round-trip time in milliseconds (smoothed average)
rtt_variance_ms: u32RTT variance in milliseconds
packet_loss_percent: u8Estimated packet loss percentage (0-100)
state: ConnectionStateCurrent connection state
last_activity: InstantLast successful communication
Trait Implementations§
Source§impl Clone for ConnectionHealth
impl Clone for ConnectionHealth
Source§fn clone(&self) -> ConnectionHealth
fn clone(&self) -> ConnectionHealth
Returns a duplicate 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 ConnectionHealth
impl Debug for ConnectionHealth
Source§impl Default for ConnectionHealth
impl Default for ConnectionHealth
Source§fn default() -> ConnectionHealth
fn default() -> ConnectionHealth
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConnectionHealth
impl RefUnwindSafe for ConnectionHealth
impl Send for ConnectionHealth
impl Sync for ConnectionHealth
impl Unpin for ConnectionHealth
impl UnsafeUnpin for ConnectionHealth
impl UnwindSafe for ConnectionHealth
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