pub struct BoundedNotificationQueue { /* private fields */ }Expand description
A bounded queue that helps with simulation of registering event sources with Poll.
It keeps track of NotificationIds associated with Waker
Implementations§
Source§impl BoundedNotificationQueue
impl BoundedNotificationQueue
Sourcepub fn push(&self, id: NotificationId) -> Result
pub fn push(&self, id: NotificationId) -> Result
Queues the NotificationId and notifies the Poll associated with Waker
Sourcepub fn pop(&self) -> Option<NotificationId>
pub fn pop(&self) -> Option<NotificationId>
Attempts to remove an element from the queue If the queue is empty, None is returned.
Trait Implementations§
Source§impl Debug for BoundedNotificationQueue
impl Debug for BoundedNotificationQueue
Source§impl Notifier for BoundedNotificationQueue
impl Notifier for BoundedNotificationQueue
Source§fn notify(&self, id: NotificationId) -> Result
fn notify(&self, id: NotificationId) -> Result
Notifies
PollAuto Trait Implementations§
impl !Freeze for BoundedNotificationQueue
impl RefUnwindSafe for BoundedNotificationQueue
impl Send for BoundedNotificationQueue
impl Sync for BoundedNotificationQueue
impl Unpin for BoundedNotificationQueue
impl UnwindSafe for BoundedNotificationQueue
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