Trait ratelimit_meter::MultiDecider [] [src]

pub trait MultiDecider: MultiDeciderImpl {
    fn check_n_at(&mut self, n: u32, at: Instant) -> Result<Decision<Self::T>> { ... }
fn check_n(&mut self, n: u32) -> Result<Decision<Self::T>> { ... } }

Provided Methods

Tests if n cells can be accommodated at the given time stamp. An error ErrorKind::InsufficientCapacity is returned if n exceeds the bucket capacity.

Tests if n cells can be accommodated at the current time (Instant::now()). An error ErrorKind::InsufficientCapacity is returned if n exceeds the bucket capacity.

Implementors