pub enum OverflowPolicy {
Err,
DiscardOldest,
}Expand description
Controls what happens when enqueue is called on a full RAM ring.
Variants§
Err
Return Err(()) — the caller decides whether to drop the item or drain first.
DiscardOldest
Silently discard the oldest buffered item(s) to make room for the new one.
The new item is always accepted as long as it physically fits in the ring
(i.e. data.len() + 2 <= RAM_BYTES).
Trait Implementations§
Source§impl Clone for OverflowPolicy
impl Clone for OverflowPolicy
Source§fn clone(&self) -> OverflowPolicy
fn clone(&self) -> OverflowPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OverflowPolicy
impl Debug for OverflowPolicy
Source§impl PartialEq for OverflowPolicy
impl PartialEq for OverflowPolicy
impl Copy for OverflowPolicy
impl Eq for OverflowPolicy
impl StructuralPartialEq for OverflowPolicy
Auto Trait Implementations§
impl Freeze for OverflowPolicy
impl RefUnwindSafe for OverflowPolicy
impl Send for OverflowPolicy
impl Sync for OverflowPolicy
impl Unpin for OverflowPolicy
impl UnsafeUnpin for OverflowPolicy
impl UnwindSafe for OverflowPolicy
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