pub struct RateLimitCharge(/* private fields */);Expand description
One slot in one address’s window, identifying the request that took it.
Carried in the request’s extensions so a handler can hand back the slot the
middleware charged it — see RateLimiter::refund. Naming the slot is
what keeps a refund from returning somebody else’s: an opaque “give one
back” cannot tell the difference once the charge it meant has aged out of
the window.
Trait Implementations§
Source§impl Clone for RateLimitCharge
impl Clone for RateLimitCharge
Source§fn clone(&self) -> RateLimitCharge
fn clone(&self) -> RateLimitCharge
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RateLimitCharge
Source§impl Debug for RateLimitCharge
impl Debug for RateLimitCharge
impl Eq for RateLimitCharge
Source§impl PartialEq for RateLimitCharge
impl PartialEq for RateLimitCharge
impl StructuralPartialEq for RateLimitCharge
Auto Trait Implementations§
impl Freeze for RateLimitCharge
impl RefUnwindSafe for RateLimitCharge
impl Send for RateLimitCharge
impl Sync for RateLimitCharge
impl Unpin for RateLimitCharge
impl UnsafeUnpin for RateLimitCharge
impl UnwindSafe for RateLimitCharge
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