pub struct LimitState<K>where
K: Key,{ /* private fields */ }Expand description
Manages the state of rate limits for various keys.
This struct holds a concurrent map of keys to their corresponding TokenBucket instances,
enabling efficient state management across asynchronous tasks.
Implementations§
Trait Implementations§
Source§impl<K> Clone for LimitState<K>
impl<K> Clone for LimitState<K>
Source§fn clone(&self) -> LimitState<K>
fn clone(&self) -> LimitState<K>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<K> Freeze for LimitState<K>
impl<K> !RefUnwindSafe for LimitState<K>
impl<K> Send for LimitState<K>
impl<K> Sync for LimitState<K>
impl<K> Unpin for LimitState<K>
impl<K> !UnwindSafe for LimitState<K>
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