pub struct PingMetrics {
pub pings_sent: Counter,
pub pings_recv: Counter,
}Expand description
Metrics for the ping protocol.
Fields§
§pings_sent: CounterThe count of valid ping messages sent.
pings_recv: CounterThe count of valid ping messages received.
Trait Implementations§
Source§impl Debug for PingMetrics
impl Debug for PingMetrics
Source§impl Default for PingMetrics
impl Default for PingMetrics
Source§fn default() -> PingMetrics
fn default() -> PingMetrics
Returns the “default value” for a type. Read more
Source§impl Iterable for PingMetrics
impl Iterable for PingMetrics
Source§fn metric_field_count(&self) -> usize
fn metric_field_count(&self) -> usize
Returns the number of metric fields in the struct.
Source§fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>
fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>
Returns the metric field at the given index.
Source§fn family_field_count(&self) -> usize
fn family_field_count(&self) -> usize
Returns the number of
Family fields in the struct.Source§fn family_field_ref(&self, _n: usize) -> Option<FamilyItem<'_>>
fn family_field_ref(&self, _n: usize) -> Option<FamilyItem<'_>>
Returns the
Family field at the given index.Auto Trait Implementations§
impl Freeze for PingMetrics
impl RefUnwindSafe for PingMetrics
impl Send for PingMetrics
impl Sync for PingMetrics
impl Unpin for PingMetrics
impl UnsafeUnpin for PingMetrics
impl UnwindSafe for PingMetrics
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> 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 moreSource§impl<T> IntoIterable for Twhere
T: Iterable,
impl<T> IntoIterable for Twhere
T: Iterable,
Source§fn as_iterable(&self) -> &dyn Iterable
fn as_iterable(&self) -> &dyn Iterable
Returns
self as dyn IterableSource§fn field_iter(&self) -> FieldIter<'_>
fn field_iter(&self) -> FieldIter<'_>
Returns an iterator over the metric fields of the struct.
Source§fn family_iter(&self) -> FamilyIter<'_>
fn family_iter(&self) -> FamilyIter<'_>
Returns an iterator over the Family fields of the struct.