[][src]Struct market::Collector

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

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

Implementations

impl<G, T> Collector<G, T> where
    T: 'static, 
[src]

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

Creates a new, empty Collector.

pub fn push<C>(&mut self, consumer: Rc<C>) where
    C: Consumer + 'static,
    G: From<C::Good> + 'static,
    T: From<C::Fault> + Error + 'static, 
[src]

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

Trait Implementations

impl<G, T> Consumer for Collector<G, T> where
    T: Error + 'static, 
[src]

type Good = G

The item being consumed.

type Fault = T

The fault that could be thrown during consumption.

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

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

impl<N, S> AssembleInto<S> for N where
    S: AssembleFrom<N>, 
[src]

type Error = <S as AssembleFrom<N>>::Error

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

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

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

impl<N, S> DisassembleInto<N> for S where
    N: DisassembleFrom<S>, 
[src]

type Error = <N as DisassembleFrom<S>>::Error

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

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.