Struct concurrency_traits::AsyncCustomQueue[][src]

pub struct AsyncCustomQueue<Q, MQ> { /* fields omitted */ }

A custom async queue for turing a queue asynchronous. Creates a task for running the queue functions.

Implementations

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

pub fn new(
    queue: Q,
    message_queue: MQ,
    thread_spawner: impl ThreadSpawner
) -> Self
[src]

Creates a new AsyncCustomQueue from a backing queue and message queue

Trait Implementations

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

The type the queue holds.

type PushFuture = CompleteFuture

The future returned by append_async

type PopFuture = ValueFuture<Self::AsyncItem>

The future returned by receive_async

impl<Q, MQ> Clone for AsyncCustomQueue<Q, MQ>[src]

impl<Q: Debug, MQ: Debug> Debug for AsyncCustomQueue<Q, MQ>[src]

Auto Trait Implementations

impl<Q, MQ> RefUnwindSafe for AsyncCustomQueue<Q, MQ> where
    MQ: RefUnwindSafe,
    Q: RefUnwindSafe

impl<Q, MQ> Send for AsyncCustomQueue<Q, MQ> where
    MQ: Send + Sync,
    Q: Send + Sync

impl<Q, MQ> Sync for AsyncCustomQueue<Q, MQ> where
    MQ: Send + Sync,
    Q: Send + Sync

impl<Q, MQ> Unpin for AsyncCustomQueue<Q, MQ>

impl<Q, MQ> UnwindSafe for AsyncCustomQueue<Q, MQ> where
    MQ: RefUnwindSafe,
    Q: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.