Trait ratelimit_meter::DeciderImpl
[−]
[src]
pub trait DeciderImpl { type T; fn test_and_update(&mut self, at: Instant) -> Result<Decision<Self::T>>; }
The trait that implementations of the metered rate-limiter interface have to implement. Users of this library should rely on Decider for the external interface.
Associated Types
type T
The (optional) type for additional information on negative decisions.
Required Methods
fn test_and_update(&mut self, at: Instant) -> Result<Decision<Self::T>>
Tests if a single cell can be accomodated in the rate limiter
at the instant at
and updates the rate-limiter to account
for the weight of the cell.
This method is not meant to be called by users,