NotificationReceiver

Trait NotificationReceiver 

Source
pub trait NotificationReceiver: Send + Sync {
    // Required methods
    fn receive(&self) -> Option<NotificationId>;
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool;
}
Expand description

Represents the side that receives event notifications

Required Methods§

Source

fn receive(&self) -> Option<NotificationId>

Retrieves the next notification, if there’s any

Source

fn len(&self) -> usize

Returns number of notifications

Source

fn is_empty(&self) -> bool

Returns true if the queue is empty.

Implementors§