Trait InputCounter
pub trait InputCounter:
Clone
+ Send
+ Sync
+ 'static {
type Tracker: InputCounterTracker;
// Required methods
fn increment(&self) -> Self::Tracker;
fn decrement(&self);
}Expand description
A counter used by CountInput to track total and concurrent inputs.
Contract:
incrementis called exactly once per input and returns the tracker inserted into extensionsdecrementis called exactly once when the input is finished
Required Associated Types§
type Tracker: InputCounterTracker
type Tracker: InputCounterTracker
Tracker that will be inserted into the input extensions.
Required Methods§
fn increment(&self) -> Self::Tracker
fn increment(&self) -> Self::Tracker
Registers a new in flight input and returns a tracker for that input.
fn decrement(&self)
fn decrement(&self)
Marks the end of an in flight input.
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.