Trait concurrency_traits::TryQueue[][src]

pub trait TryQueue {
    type Item;
    fn try_push(&self, value: Self::Item) -> Result<(), Self::Item>;
fn try_pop(&self) -> Option<Self::Item>;
fn clear(&self); }

A generic queue that supports try operations

Associated Types

type Item[src]

The type the queue holds.

Loading content...

Required methods

fn try_push(&self, value: Self::Item) -> Result<(), Self::Item>[src]

Tries to append an item to the queue returning None if unsuccessful

fn try_pop(&self) -> Option<Self::Item>[src]

Tries to receive an item from the queue returning None if none available

fn clear(&self)[src]

Clears the queue

Loading content...

Implementors

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

type Item = <T::Target as TryQueue>::Item

Loading content...