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

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.

This method is not meant to be called by users,

Implementors