pub struct MeRateLimit {
pub tier: String,
pub limit: u32,
pub remaining: u32,
pub reset_secs: u64,
}Expand description
Request rate-limit bucket snapshot (req/s token bucket).
Fields§
§tier: StringRate-limit tier vocabulary: cidr_override / admin / read_uplift /
anonymous (wider than the auth tier — kept as a string).
limit: u32Bucket capacity (requests the tier may spend per refill window).
remaining: u32Whole tokens left in the caller’s bucket right now.
reset_secs: u64Seconds until the rate-limit bucket refills (RELATIVE duration). NOT a
timestamp — contrast MeTokenWindow::reset_at_secs, which is absolute.
Trait Implementations§
Source§impl Clone for MeRateLimit
impl Clone for MeRateLimit
Source§fn clone(&self) -> MeRateLimit
fn clone(&self) -> MeRateLimit
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 moreSource§impl Debug for MeRateLimit
impl Debug for MeRateLimit
Source§impl<'de> Deserialize<'de> for MeRateLimit
impl<'de> Deserialize<'de> for MeRateLimit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MeRateLimit
Source§impl PartialEq for MeRateLimit
impl PartialEq for MeRateLimit
Source§fn eq(&self, other: &MeRateLimit) -> bool
fn eq(&self, other: &MeRateLimit) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MeRateLimit
impl Serialize for MeRateLimit
impl StructuralPartialEq for MeRateLimit
Auto Trait Implementations§
impl Freeze for MeRateLimit
impl RefUnwindSafe for MeRateLimit
impl Send for MeRateLimit
impl Sync for MeRateLimit
impl Unpin for MeRateLimit
impl UnsafeUnpin for MeRateLimit
impl UnwindSafe for MeRateLimit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.