pub struct Observations {
pub msg_sent: u64,
pub ack_received: u64,
/* private fields */
}Expand description
Observations related to a specific peer in the network.
Fields§
§msg_sent: u64§ack_received: u64Trait Implementations§
Source§impl Clone for Observations
impl Clone for Observations
Source§fn clone(&self) -> Observations
fn clone(&self) -> Observations
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 Observations
impl Debug for Observations
Source§impl Default for Observations
impl Default for Observations
Source§fn default() -> Observations
fn default() -> Observations
Returns the “default value” for a type. Read more
Source§impl Observable for Observations
impl Observable for Observations
Source§fn record_probe(&mut self, latency: Result<Duration, ()>)
fn record_probe(&mut self, latency: Result<Duration, ()>)
Record a new result of the probe towards the measured peer.
Source§fn last_update(&self) -> Duration
fn last_update(&self) -> Duration
The timestamp of the last update.
Source§fn average_latency(&self) -> Option<Duration>
fn average_latency(&self) -> Option<Duration>
Return average latency observed for the measured peer.
Source§fn average_probe_rate(&self) -> f64
fn average_probe_rate(&self) -> f64
A value representing the average success rate of probes. Read more
Source§impl PartialEq for Observations
impl PartialEq for Observations
impl Copy for Observations
impl StructuralPartialEq for Observations
Auto Trait Implementations§
impl Freeze for Observations
impl RefUnwindSafe for Observations
impl Send for Observations
impl Sync for Observations
impl Unpin for Observations
impl UnwindSafe for Observations
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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