[][src]Struct market::Distributor

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

Distributes goods to multiple producers.

Implementations

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

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

Creates a new, empty Distributor.

pub fn push<P>(&mut self, producer: Rc<P>) where
    P: Producer + 'static,
    G: TryInto<P::Good> + 'static,
    T: From<P::Fault> + Error + 'static, 
[src]

Adds producer to the end of the [Producers]s held by self.

Trait Implementations

impl<G, T> Debug for Distributor<G, T>[src]

impl<G, T> Default for Distributor<G, T>[src]

impl<G, T> Producer for Distributor<G, T> where
    T: Error + 'static,
    G: Clone
[src]

type Good = G

The item being produced.

type Fault = T

The fault that could be thrown during production.

Auto Trait Implementations

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

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

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

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

impl<G, T> !UnwindSafe for Distributor<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.