Skip to main content

Overflow

Trait Overflow 

Source
pub trait Overflow<T>: Default {
    // Required methods
    fn is_empty(&self) -> bool;
    fn drain<F>(&mut self, push: F)
       where F: FnMut(T) -> Option<T>;
}
Expand description

Retained overflow messages for a mailbox policy.

Required Methods§

Source

fn is_empty(&self) -> bool

Return whether the retained message set is empty.

Source

fn drain<F>(&mut self, push: F)
where F: FnMut(T) -> Option<T>,

Drain retained messages into push in delivery order until push rejects a message.

If push returns Some, the undelivered message and any later messages must remain retained for a future drain.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Overflow<T> for VecDeque<T>

Source§

fn is_empty(&self) -> bool

Source§

fn drain<F>(&mut self, push: F)
where F: FnMut(T) -> Option<T>,

Implementors§