Struct actix_extensible_rate_limit::backend::SimpleOutput
source · pub struct SimpleOutput {
pub limit: u64,
pub remaining: u64,
pub reset: Instant,
}
Expand description
A default Backend::Output structure.
This may not be suitable for all use-cases.
Fields§
§limit: u64
Total number of requests that are permitted within the rate limit interval.
remaining: u64
Number of requests that will be permitted until the limit resets.
reset: Instant
Time at which the rate limit resets.
Trait Implementations§
source§impl Clone for SimpleOutput
impl Clone for SimpleOutput
source§fn clone(&self) -> SimpleOutput
fn clone(&self) -> SimpleOutput
Returns a copy 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 moresource§impl Debug for SimpleOutput
impl Debug for SimpleOutput
source§impl HeaderCompatibleOutput for SimpleOutput
impl HeaderCompatibleOutput for SimpleOutput
source§fn seconds_until_reset(&self) -> u64
fn seconds_until_reset(&self) -> u64
Seconds until the rate limit resets (rounded upwards, so that it is guaranteed to be reset after waiting for the duration).
Auto Trait Implementations§
impl RefUnwindSafe for SimpleOutput
impl Send for SimpleOutput
impl Sync for SimpleOutput
impl Unpin for SimpleOutput
impl UnwindSafe for SimpleOutput
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