pub trait ResourceCounterContext<R, T>: CounterContext<T> {
// Required method
fn per_resource_counters<'a>(&'a self, resource: &'a R) -> &'a T;
// Provided method
fn increment_both<F: Fn(&T) -> &Counter>(&self, resource: &R, cb: F) { ... }
}
Expand description
A context that provides access to per-resource counters for observation and debugging.
Required Methods§
Sourcefn per_resource_counters<'a>(&'a self, resource: &'a R) -> &'a T
fn per_resource_counters<'a>(&'a self, resource: &'a R) -> &'a T
Returns a reference to the set of counters on resource
.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.