pub struct StorageKey<'a> {
pub user_id: &'a str,
pub tier: &'a str,
}Expand description
Identifies one rate-limit bucket: a user within a tier.
The parts stay separate so each backend can choose an encoding in which distinct pairs stay distinct, even when a user id or tier name contains the backend’s separator.
Fields§
§user_id: &'a strThe user identifier returned by the identifier.
tier: &'a strThe tier whose quota applies to this bucket.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for StorageKey<'a>
impl<'a> Clone for StorageKey<'a>
impl<'a> Copy for StorageKey<'a>
Source§impl<'a> Debug for StorageKey<'a>
impl<'a> Debug for StorageKey<'a>
impl<'a> Eq for StorageKey<'a>
Source§impl<'a> Hash for StorageKey<'a>
impl<'a> Hash for StorageKey<'a>
Source§impl<'a> PartialEq for StorageKey<'a>
impl<'a> PartialEq for StorageKey<'a>
impl<'a> StructuralPartialEq for StorageKey<'a>
Auto Trait Implementations§
impl<'a> Freeze for StorageKey<'a>
impl<'a> RefUnwindSafe for StorageKey<'a>
impl<'a> Send for StorageKey<'a>
impl<'a> Sync for StorageKey<'a>
impl<'a> Unpin for StorageKey<'a>
impl<'a> UnsafeUnpin for StorageKey<'a>
impl<'a> UnwindSafe for StorageKey<'a>
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