Trait ratelimit_meter::Decider
[−]
[src]
pub trait Decider: DeciderImpl { fn check(&mut self) -> Result<Decision<Self::T>> { ... } fn check_at(&mut self, at: Instant) -> Result<Decision<Self::T>> { ... } }
The external interface offered by all rate-limiting implementations.
Provided Methods
fn check(&mut self) -> Result<Decision<Self::T>>
Tests if a single cell can be accomodated at
Instant::now()
. See check_at
.
fn check_at(&mut self, at: Instant) -> Result<Decision<Self::T>>
Tests is a single cell can be accomodated at the given time stamp.