Trait ratelimit_meter::Decider [] [src]

pub trait Decider {
    type T;
    fn test_and_update(&mut self, at: Instant) -> Decision<Self::T>;
fn build_with(l: &Limiter) -> Result<Self>
    where
        Self: Sized
; fn check(&mut self) -> Decision<Self::T> { ... } }

Associated Types

The (optional) type for additional information on negative decisions.

Required Methods

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.

Converts the limiter builder into a concrete decider structure.

Provided Methods

Tests if a single cell can be accomodated now. See test_and_update.

Implementors