[−][src]Struct ratelimit_meter::algorithms::leaky_bucket::TooEarly
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 earliest_possible(&self) -> 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
Blanket Implementations
impl<P, T> NonConformanceExt for T where
P: Absolute,
T: NonConformance<P>,
[src]
P: Absolute,
T: NonConformance<P>,
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]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Rfn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut R
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.