pub struct LimitResult {
pub limited: bool,
pub remaining: usize,
pub retry_after: Option<Duration>,
pub reset_after: Duration,
}Expand description
Result of a limit check.
Fields§
§limited: boolWhether the request is limited.
remaining: usizeRemaining requests that can be made within the limit.
retry_after: Option<Duration>Duration after which the request can be retried.
If the request is not limited, this will be None.
reset_after: DurationDuration after which the limit will be totally reset.
Trait Implementations§
Source§impl Clone for LimitResult
impl Clone for LimitResult
Source§fn clone(&self) -> LimitResult
fn clone(&self) -> LimitResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LimitResult
impl RefUnwindSafe for LimitResult
impl Send for LimitResult
impl Sync for LimitResult
impl Unpin for LimitResult
impl UnwindSafe for LimitResult
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