[][src]Struct ratelimit_meter::algorithms::leaky_bucket::TooEarly

pub struct TooEarly<P: Relative>(_, _);

Returned in case of a negative rate-limiting decision.

To avoid the thundering herd effect, client code should always add some jitter to the wait time.

Trait Implementations

impl<P: Relative> NonConformance<P> for TooEarly<P>[src]

fn wait_time_from(&self, from: P) -> Duration[src]

Returns the minimum amount of time from the time that the decision was made (relative to the at argument in a Decider's check_at method) that must pass before a decision can be conforming. Since Durations can not be negative, a zero duration is returned if from is already after that duration. Read more

impl<P: PartialEq + Relative> PartialEq<TooEarly<P>> for TooEarly<P>[src]

impl<P: Relative> Display for TooEarly<P>[src]

impl<P: Debug + Relative> Debug for TooEarly<P>[src]

Auto Trait Implementations

impl<P> Send for TooEarly<P>

impl<P> Sync for TooEarly<P>

Blanket Implementations

impl<P, T> NonConformanceExt for T where
    P: Absolute,
    T: NonConformance<P>, 
[src]

fn wait_time(&self) -> Duration[src]

Returns the minimum amount of time (down to 0) that needs to pass from the current instant for the Decider to consider a cell conforming again. Read more

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T