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 push_async
type PopFuture: Future<Output = Self::AsyncItem>
[src]
The future returned by pop_async
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.
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]
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>
fn push_async(&self, value: Self::AsyncItem) -> Self::PushFuture
[src]
fn pop_async(&self) -> Self::PopFuture
[src]
impl<Q, MQ> AsyncQueue for AsyncCustomPrependQueue<Q, MQ> where
Q: PrependQueue + Send + Sync + 'static,
MQ: Queue<Item = AsyncQueueMessage<Q::Item>> + Send + Sync + 'static,
[src]
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>
fn push_async(&self, value: Self::AsyncItem) -> Self::PushFuture
[src]
fn pop_async(&self) -> Self::PopFuture
[src]
impl<Q, MQ> AsyncQueue for AsyncCustomQueue<Q, MQ> where
Q: Queue + Send + Sync + 'static,
MQ: Queue<Item = AsyncQueueMessage<Q::Item>> + Send + Sync + 'static,
[src]
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>
fn push_async(&self, value: Self::AsyncItem) -> Self::PushFuture
[src]
fn pop_async(&self) -> Self::PopFuture
[src]
impl<Q, MQ> AsyncQueue for AsyncCustomReverseQueue<Q, MQ> where
Q: ReverseQueue + Send + Sync + 'static,
MQ: Queue<Item = AsyncQueueMessage<Q::Item>> + Send + Sync + 'static,
[src]
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>
fn push_async(&self, value: Self::AsyncItem) -> Self::PushFuture
[src]
fn pop_async(&self) -> Self::PopFuture
[src]
impl<T: ?Sized> AsyncQueue for T where
T: Deref,
T::Target: AsyncQueue,
[src]
impl<T: ?Sized> AsyncQueue for T where
T: Deref,
T::Target: AsyncQueue,
[src]