Trait AsyncStack

Source
pub trait AsyncStack: TryStack {
    type PushFuture: Future<Output = ()>;
    type PopFuture: Future<Output = Self::Item>;

    // Required methods
    fn push_async(&self, value: Self::Item) -> Self::PushFuture;
    fn pop_async(&self) -> Self::PopFuture;
}
Expand description

A stack with async operations

Required Associated Types§

Source

type PushFuture: Future<Output = ()>

The future returned by push_async

Source

type PopFuture: Future<Output = Self::Item>

The future returned by pop_async

Required Methods§

Source

fn push_async(&self, value: Self::Item) -> Self::PushFuture

Push an item onto the stack asynchronously

Source

fn pop_async(&self) -> Self::PopFuture

Pops an item from the stack asynchronously

Implementors§