[][src]Struct market::Collector

pub struct Collector<G, E> { /* fields omitted */ }

A Consumer that consumes goods of type G from multiple Consumers.

Implementations

impl<G, E> Collector<G, E>[src]

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

Creates a new, empty Collector.

pub fn convert_into_and_push<C>(&mut self, consumer: C) where
    C: Consumer + 'static,
    G: From<C::Good> + 'static,
    E: From<C::Failure> + Error + 'static, 
[src]

Converts consumer to an appropriate type then pushes it.

pub fn push<C>(&mut self, consumer: C) where
    C: Consumer<Good = G, Failure = E> + 'static,
    E: Error
[src]

Adds consumer to the end of the Consumers held by self.

Trait Implementations

impl<G, E> Consumer for Collector<G, E> where
    E: Error
[src]

type Good = G

The type of the item being consumed.

type Failure = E

The type of the error that could be thrown during consumption.

impl<G, E> Debug for Collector<G, E>[src]

impl<G: Default, E: Default> Default for Collector<G, E>[src]

Auto Trait Implementations

impl<G, E> !RefUnwindSafe for Collector<G, E>

impl<G, E> !Send for Collector<G, E>

impl<G, E> !Sync for Collector<G, E>

impl<G, E> Unpin for Collector<G, E>

impl<G, E> !UnwindSafe for Collector<G, E>

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.