Struct ratelimit_meter::algorithms::gcra::NotUntil
source · pub struct NotUntil(_);
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
sourceimpl Fail for NotUntil
impl Fail for NotUntil
sourcefn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moresourceimpl NonConformance for NotUntil
impl NonConformance for NotUntil
sourcefn earliest_possible(&self) -> Instant
fn earliest_possible(&self) -> Instant
Returns the earliest time at which a decision could be
conforming (excluding conforming decisions made by the Decider
that are made in the meantime). Read more
sourcefn wait_time_from(&self, from: Instant) -> Duration
fn wait_time_from(&self, from: Instant) -> 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. Read moreimpl StructuralPartialEq for NotUntil
Auto Trait Implementations
impl RefUnwindSafe for NotUntil
impl Send for NotUntil
impl Sync for NotUntil
impl Unpin for NotUntil
impl UnwindSafe for NotUntil
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more