pub enum Overflow {
KeepNewest,
KeepOldest,
}Expand description
What to discard when the queue is full.
Variants§
KeepNewest
Drop the oldest queued value.
The default, and right for anything that reports current state: a stale battery level or heart rate is worthless once a newer one has arrived.
KeepOldest
Drop the value just arrived.
Right for anything being reassembled in order — a firmware image, a log download — where a contiguous prefix and a known stopping point beat a fresher fragment with a hole before it.
Trait Implementations§
impl Copy for Overflow
impl Eq for Overflow
impl StructuralPartialEq for Overflow
Auto Trait Implementations§
impl Forget for Overflow
impl Freeze for Overflow
impl Move for Overflow
impl RefUnwindSafe for Overflow
impl Send for Overflow
impl Sync for Overflow
impl Unpin for Overflow
impl UnsafeUnpin for Overflow
impl UnwindSafe for Overflow
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