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§
Source§impl<K: Default + Eq + Hash + MallocSizeOf> Default for ThrottledManager<K>
impl<K: Default + Eq + Hash + MallocSizeOf> Default for ThrottledManager<K>
Source§fn default() -> ThrottledManager<K>
fn default() -> ThrottledManager<K>
Returns the “default value” for a type. Read more
Source§impl<K> MallocSizeOf for ThrottledManager<K>
impl<K> MallocSizeOf for ThrottledManager<K>
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl<K> Freeze for ThrottledManager<K>
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