Struct libp2p_kad::QueryStats [−][src]
pub struct QueryStats { /* fields omitted */ }Expand description
Execution statistics of a query.
Implementations
Gets the total number of requests initiated by the query.
Gets the number of successful requests.
Gets the number of failed requests.
Gets the number of pending requests.
Note: A query can finish while still having pending requests, if the termination conditions are already met.
Gets the duration of the query.
If the query has not yet finished, the duration is measured from the start of the query to the current instant.
If the query did not yet start (i.e. yield the first peer to contact),
None is returned.
Merges these stats with the given stats of another query, e.g. to accumulate statistics from a multi-phase query.
Counters are merged cumulatively while the instants for start and end of the queries are taken as the minimum and maximum, respectively.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for QueryStatsimpl Send for QueryStatsimpl Sync for QueryStatsimpl Unpin for QueryStatsimpl UnwindSafe for QueryStatsBlanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V