pub enum Frequency {
OnEvent,
Interval(Duration),
OnEventWhen(Duration),
}Expand description
The Frequency is used to tune the speed of the throttle.
Variants§
OnEvent
OnEvent fires any time an event arrives. It is specifically designed for infrequent but important events.
Interval(Duration)
Interval(x) fires every interval x, regardless of the incoming events.
OnEventWhen(Duration)
OnEventWhen(x) fires for an event only after the interval has been passed. It is specifically desgined for high memory types.
Trait Implementations§
Source§impl Ord for Frequency
impl Ord for Frequency
Source§impl PartialOrd for Frequency
impl PartialOrd for Frequency
impl Eq for Frequency
impl StructuralPartialEq for Frequency
Auto Trait Implementations§
impl Freeze for Frequency
impl RefUnwindSafe for Frequency
impl Send for Frequency
impl Sync for Frequency
impl Unpin for Frequency
impl UnwindSafe for Frequency
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