pub struct NotUntil<P: Reference> { /* private fields */ }
Expand description
A negative rate-limiting outcome.
NotUntil
’s methods indicate when a caller can expect the next positive
rate-limiting result.
Implementations§
source§impl<P: Reference> NotUntil<P>
impl<P: Reference> NotUntil<P>
sourcepub fn earliest_possible(&self) -> P
pub 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).
sourcepub fn wait_time_from(&self, from: P) -> Duration
pub fn wait_time_from(&self, from: P) -> Duration
Returns the minimum amount of time from the time that the decision was made that must pass before a decision can be conforming.
If the time of the next expected positive result is in the past,
wait_time_from
returns a zero Duration
.
Trait Implementations§
source§impl<P: PartialEq + Reference> PartialEq for NotUntil<P>
impl<P: PartialEq + Reference> PartialEq for NotUntil<P>
impl<P: Eq + Reference> Eq for NotUntil<P>
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