pub struct DhtMetrics { /* private fields */ }Expand description
DHT metrics
Implementations§
Source§impl DhtMetrics
impl DhtMetrics
Sourcepub fn query_made(&self)
pub fn query_made(&self)
Record a DHT query
Sourcepub fn query_successful(&self)
pub fn query_successful(&self)
Record a successful query
Sourcepub fn query_failed(&self)
pub fn query_failed(&self)
Record a failed query
Sourcepub fn provider_published(&self)
pub fn provider_published(&self)
Record provider published
Sourcepub fn provider_query(&self)
pub fn provider_query(&self)
Record provider query
Sourcepub fn providers_found(&self, count: u64)
pub fn providers_found(&self, count: u64)
Record providers found
Sourcepub fn set_routing_table_size(&self, size: u64)
pub fn set_routing_table_size(&self, size: u64)
Update routing table size
Sourcepub fn snapshot(&self) -> DhtMetricsSnapshot
pub fn snapshot(&self) -> DhtMetricsSnapshot
Get snapshot
Auto Trait Implementations§
impl !Freeze for DhtMetrics
impl RefUnwindSafe for DhtMetrics
impl Send for DhtMetrics
impl Sync for DhtMetrics
impl Unpin for DhtMetrics
impl UnwindSafe for DhtMetrics
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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 more