pub struct Builder<T>where
    T: Algorithm + Sized,
{ /* private fields */ }
Expand description

An object that allows incrementally constructing rate Limiter objects.

Implementations

Sets the “weight” of each cell being checked against the bucket. Each cell fills the bucket by this much.

Sets the “unit of time” within which the bucket drains.

The assumption is that in a period of time_unit (if no cells are being checked), the bucket is fully drained.

Builds a rate limiter of the specified type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.