Struct http_rate::RateSnapshot
source · pub struct RateSnapshot { /* private fields */ }
Expand description
Information about the rate-limiting state used to reach a decision.
Implementations§
source§impl RateSnapshot
impl RateSnapshot
sourcepub fn extend_response<Ext>(&self, res: &mut Response<Ext>)
pub fn extend_response<Ext>(&self, res: &mut Response<Ext>)
extend response headers with headers
Header: x-ratelimit-limit: <num>
Header: x-ratelimit-remaining: <num>
Trait Implementations§
source§impl Clone for RateSnapshot
impl Clone for RateSnapshot
source§fn clone(&self) -> RateSnapshot
fn clone(&self) -> RateSnapshot
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 RateSnapshot
impl Debug for RateSnapshot
source§impl PartialEq for RateSnapshot
impl PartialEq for RateSnapshot
source§fn eq(&self, other: &RateSnapshot) -> bool
fn eq(&self, other: &RateSnapshot) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for RateSnapshot
impl StructuralEq for RateSnapshot
impl StructuralPartialEq for RateSnapshot
Auto Trait Implementations§
impl RefUnwindSafe for RateSnapshot
impl Send for RateSnapshot
impl Sync for RateSnapshot
impl Unpin for RateSnapshot
impl UnwindSafe for RateSnapshot
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