pub enum Throttle<C = RealClock> {
Stable(Stable<C>),
AllOut,
}Expand description
The throttle mechanism
Variants§
Stable(Stable<C>)
Load that comes from this variant is stable with respect to the clock
AllOut
Load that comes from this variant is as fast as possible with respect to the clock
Implementations§
Source§impl Throttle<RealClock>
impl Throttle<RealClock>
Sourcepub fn new_with_config(config: Config, maximum_capacity: NonZeroU32) -> Self
pub fn new_with_config(config: Config, maximum_capacity: NonZeroU32) -> Self
Create a new instance of Throttle with a real-time clock
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Throttle<C>where
C: Freeze,
impl<C> RefUnwindSafe for Throttle<C>where
C: RefUnwindSafe,
impl<C> Send for Throttle<C>where
C: Send,
impl<C> Sync for Throttle<C>where
C: Sync,
impl<C> Unpin for Throttle<C>where
C: Unpin,
impl<C> UnwindSafe for Throttle<C>where
C: 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