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 main decision trait. It allows checking a single cell against the rate-limiter, either at the current time instant, or at a given instant in time, both destructively.

Provided Methods

Tests if a single cell can be accommodated at Instant::now(). See check_at.

Tests is a single cell can be accommodated at the given time stamp.

Implementors