pub struct Inbox<T> { /* private fields */ }Expand description
A node’s reader on one of its input queues.
Implementations§
Source§impl<T> Inbox<T>
impl<T> Inbox<T>
Sourcepub fn poll_peek(&self) -> Poll<Ref<'_, Item<T>>>
pub fn poll_peek(&self) -> Poll<Ref<'_, Item<T>>>
The next item, if one is waiting; otherwise Pending, with the node set to wait for
input. Does not move past the item and does not charge the budget.
Sourcepub fn peek_with<'a, R, F>(&'a self, f: F) -> impl Future<Output = R> + 'a
pub fn peek_with<'a, R, F>(&'a self, f: F) -> impl Future<Output = R> + 'a
Waits for the next item and reads it through f without taking it. Waits for budget
first, so that a node looking at many items yields like one taking them.
Sourcepub fn head_time(&self) -> Option<Tick>
pub fn head_time(&self) -> Option<Tick>
The time of the item at the head, if one is waiting; see Item::time.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Inbox<T>
impl<T> !Send for Inbox<T>
impl<T> !Sync for Inbox<T>
impl<T> !UnwindSafe for Inbox<T>
impl<T> Freeze for Inbox<T>
impl<T> Unpin for Inbox<T>
impl<T> UnsafeUnpin for Inbox<T>
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