[][src]Struct market::UnlimitedQueue

pub struct UnlimitedQueue<G> { /* fields omitted */ }

Defines a queue with unlimited size that implements Consumer and Producer.

An UnlimitedQueue can be closed, which prevents the Producer from producing new goods while allowing the Consumer to consume only the remaining goods on the queue.

Methods

impl<G> UnlimitedQueue<G>[src]

#[must_use]pub fn new() -> Self[src]

Creates a new empty UnlimitedQueue.

pub fn close(&self)[src]

Closes self.

Trait Implementations

impl<G> Consumer for UnlimitedQueue<G>[src]

type Good = G

The item being consumed.

type Error = ClosedMarketError

The error when Self is not functional. Read more

impl<G: Debug> Debug for UnlimitedQueue<G>[src]

impl<G> Default for UnlimitedQueue<G>[src]

impl<G> Producer for UnlimitedQueue<G>[src]

type Good = G

The item being produced.

type Error = ClosedMarketError

The error when Self is not functional. Read more

Auto Trait Implementations

impl<G> RefUnwindSafe for UnlimitedQueue<G> where
    G: RefUnwindSafe

impl<G> Send for UnlimitedQueue<G> where
    G: Send

impl<G> Sync for UnlimitedQueue<G> where
    G: Send

impl<G> Unpin for UnlimitedQueue<G> where
    G: Unpin

impl<G> !UnwindSafe for UnlimitedQueue<G>

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, 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.