Struct throttling::token_bucket::ThrottledManager
source · pub struct ThrottledManager<K: Eq + Hash + MallocSizeOf> { /* private fields */ }
Implementations§
source§impl<K: Eq + Hash + MallocSizeOf> ThrottledManager<K>
impl<K: Eq + Hash + MallocSizeOf> ThrottledManager<K>
pub fn set_throttled(&mut self, k: K, until: Instant)
pub fn check_throttled(&mut self, k: &K) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<K> RefUnwindSafe for ThrottledManager<K>where
K: RefUnwindSafe,
impl<K> Send for ThrottledManager<K>where
K: Send,
impl<K> Sync for ThrottledManager<K>where
K: Sync,
impl<K> Unpin for ThrottledManager<K>where
K: Unpin,
impl<K> UnwindSafe for ThrottledManager<K>where
K: UnwindSafe,
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