pub struct WorkQueueReceiver<T> { /* private fields */ }Expand description
The receiving side of a work queue, for a single worker.
Implementations§
Source§impl<T> WorkQueueReceiver<T>
impl<T> WorkQueueReceiver<T>
Sourcepub async fn recv(&mut self) -> Option<T>
pub async fn recv(&mut self) -> Option<T>
Receives the next item queued for this worker.
Returns None once every sender has been dropped and no items remain queued for this worker.
This method is cancel safe: if it’s used in select! and another branch completes first, no item is lost.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for WorkQueueReceiver<T>
impl<T> RefUnwindSafe for WorkQueueReceiver<T>
impl<T> Send for WorkQueueReceiver<T>where
T: Send,
impl<T> Sync for WorkQueueReceiver<T>where
T: Send,
impl<T> Unpin for WorkQueueReceiver<T>
impl<T> UnsafeUnpin for WorkQueueReceiver<T>
impl<T> UnwindSafe for WorkQueueReceiver<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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self> ⓘ
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self> ⓘ
Instruments this type by attaching the given resource group token, returning a
Tracked wrapper. Read more