Struct nolock::queues::spsc::bounded::AsyncBoundedReceiver [−][src]
pub struct AsyncBoundedReceiver<T> { /* fields omitted */ }
Expand description
An async variant of the BoundedReceiver
that allows your to efficiently
use this Queue in async Contexts as well.
Created using the async_queue
method
Implementations
Checks if the Queue has been closed by the Producer
Note
Even when this indicates that the Queue is closed, there might still be Items left in the Queue that the Consumer should dequeue first to make sure that no data is lost
pub fn dequeue<'queue>(&'queue mut self) -> DequeueFuture<'queue, T>ⓘNotable traits for DequeueFuture<'queue, T>
impl<'queue, T> Future for DequeueFuture<'queue, T> type Output = Result<T, DequeueError>;
pub fn dequeue<'queue>(&'queue mut self) -> DequeueFuture<'queue, T>ⓘNotable traits for DequeueFuture<'queue, T>
impl<'queue, T> Future for DequeueFuture<'queue, T> type Output = Result<T, DequeueError>;
The async variant of the blocking dequeue
operation on the Non-Async version of the Queue
Attempts to dequeue a single Item from the Queue.
This behaves just like the non-async
try_dequeue
operation
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for AsyncBoundedReceiver<T>
impl<T> Send for AsyncBoundedReceiver<T>
impl<T> Sync for AsyncBoundedReceiver<T>
impl<T> Unpin for AsyncBoundedReceiver<T>
impl<T> !UnwindSafe for AsyncBoundedReceiver<T>