pub struct NotUntil<P: Reference>(/* private fields */);
Expand description
Returned in case of a negative rate-limiting decision. Indicates the earliest instant that a cell might get accepted again.
To avoid thundering herd effects, client code should always add a random amount of jitter to wait time estimates.
Trait Implementations§
Source§impl<P: Reference> NonConformance<P> for NotUntil<P>
impl<P: Reference> NonConformance<P> for NotUntil<P>
Source§fn earliest_possible(&self) -> P
fn earliest_possible(&self) -> P
Returns the earliest time at which a decision could be
conforming (excluding conforming decisions made by the Decider
that are made in the meantime).
Source§fn wait_time_from(&self, from: P) -> Duration
fn wait_time_from(&self, from: P) -> Duration
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.impl<P: Reference> StructuralPartialEq for NotUntil<P>
Auto Trait Implementations§
impl<P> Freeze for NotUntil<P>where
P: Freeze,
impl<P> RefUnwindSafe for NotUntil<P>where
P: RefUnwindSafe,
impl<P> Send for NotUntil<P>
impl<P> Sync for NotUntil<P>
impl<P> Unpin for NotUntil<P>where
P: Unpin,
impl<P> UnwindSafe for NotUntil<P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more