Trait concurrency_traits::AsyncQueue[][src]

pub trait AsyncQueue {
    type AsyncItem;
    type PushFuture: Future<Output = ()>;
    type PopFuture: Future<Output = Self::AsyncItem>;
    fn push_async(&self, value: Self::AsyncItem) -> Self::PushFuture;
fn pop_async(&self) -> Self::PopFuture; }

A Queue that can be accessed asynchronously

Associated Types

type AsyncItem[src]

The type the queue holds.

type PushFuture: Future<Output = ()>[src]

The future returned by append_async

type PopFuture: Future<Output = Self::AsyncItem>[src]

The future returned by receive_async

Loading content...

Required methods

fn push_async(&self, value: Self::AsyncItem) -> Self::PushFuture[src]

Appends to the queue asynchronously.

fn pop_async(&self) -> Self::PopFuture[src]

Receives from the queue asynchronously.

Loading content...

Implementors

impl<Q, MQ> AsyncQueue for AsyncCustomDoubleEndedQueue<Q, MQ> where
    Q: DoubleEndedQueue + Send + Sync + 'static,
    MQ: Queue<Item = AsyncQueueMessage<Q::Item>> + Send + Sync + 'static, 
[src]

type AsyncItem = Q::Item

type PushFuture = CompleteFuture

type PopFuture = ValueFuture<Self::AsyncItem>

impl<Q, MQ> AsyncQueue for AsyncCustomPrependQueue<Q, MQ> where
    Q: PrependQueue + Send + Sync + 'static,
    MQ: Queue<Item = AsyncQueueMessage<Q::Item>> + Send + Sync + 'static, 
[src]

type AsyncItem = Q::Item

type PushFuture = CompleteFuture

type PopFuture = ValueFuture<Self::AsyncItem>

impl<Q, MQ> AsyncQueue for AsyncCustomQueue<Q, MQ> where
    Q: Queue + Send + Sync + 'static,
    MQ: Queue<Item = AsyncQueueMessage<Q::Item>> + Send + Sync + 'static, 
[src]

type AsyncItem = Q::Item

type PushFuture = CompleteFuture

type PopFuture = ValueFuture<Self::AsyncItem>

impl<Q, MQ> AsyncQueue for AsyncCustomReverseQueue<Q, MQ> where
    Q: ReverseQueue + Send + Sync + 'static,
    MQ: Queue<Item = AsyncQueueMessage<Q::Item>> + Send + Sync + 'static, 
[src]

type AsyncItem = Q::Item

type PushFuture = CompleteFuture

type PopFuture = ValueFuture<Self::AsyncItem>

impl<T: ?Sized> AsyncQueue for T where
    T: Deref,
    T::Target: AsyncQueue
[src]

type AsyncItem = <T::Target as AsyncQueue>::AsyncItem

type PushFuture = <T::Target as AsyncQueue>::PushFuture

type PopFuture = <T::Target as AsyncQueue>::PopFuture

Loading content...