Trait market::Producer [−][src]
Specifies the storage of goods into a market.
Associated Types
type Good
[src]
The item being produced.
type Failure: Failure
[src]
Describes a failure to successfully complete production.
Provided methods
fn produce(&self, good: Self::Good) -> Result<(), Self::Failure>
[src]
Stores good
in the market without blocking.
SHALL only run in the calling process and return without blocking.
Errors
If fault T
is caught, SHALL throw Self::Failure
F
such that F.fault() == Some(T)
. If self
cannot store good
without blocking, SHALL throw an appropriate Self::Failure
.
fn produce_all<I: IntoIterator<Item = Self::Good>>(
&self,
goods: I
) -> Result<(), Self::Failure> where
Self: Sized,
[src]
&self,
goods: I
) -> Result<(), Self::Failure> where
Self: Sized,
Stores each good in goods
in the market without blocking.
Errors
If Failure
F
is caught, SHALL attempt no further goods and throw F
.
fn force(
&self,
good: Self::Good
) -> Result<(), <Self::Failure as Failure>::Fault> where
Self::Good: Clone,
[src]
&self,
good: Self::Good
) -> Result<(), <Self::Failure as Failure>::Fault> where
Self::Good: Clone,
Stores good
in the market, blocking until space is available.
Errors
If fault T
is caught, SHALL throw T
fn force_all<I: IntoIterator<Item = Self::Good>>(
&self,
goods: I
) -> Result<(), <Self::Failure as Failure>::Fault> where
Self: Sized,
Self::Good: Clone,
[src]
&self,
goods: I
) -> Result<(), <Self::Failure as Failure>::Fault> where
Self: Sized,
Self::Good: Clone,
Stores every good in goods
, blocking until space is available.
Errors
If fault T
is caught, SHALL attempt no further goods and throw T
.
Implementations on Foreign Types
impl<G> Producer for Sender<G>
[src]
type Good = G
type Failure = ProduceFailure<WithdrawnDemand>
fn produce(&self, good: Self::Good) -> Result<(), Self::Failure>
[src]
Implementors
impl Producer for Trigger
[src]
type Good = ()
type Failure = Infallible
fn produce(&self, _: Self::Good) -> Result<(), Self::Failure>
[src]
impl<G> Producer for StdProducer<G>
[src]
type Good = G
type Failure = ProduceFailure<WithdrawnDemand>
fn produce(&self, good: Self::Good) -> Result<(), Self::Failure>
[src]
impl<G> Producer for Supplier<G>
[src]
type Good = G
type Failure = Infallible
fn produce(&self, good: Self::Good) -> Result<(), Self::Failure>
[src]
impl<G> Producer for Deliverer<G>
[src]
type Good = G
type Failure = InsufficientStockFailure
fn produce(&self, good: Self::Good) -> Result<(), Self::Failure>
[src]
impl<G, T> Producer for Distributor<G, T> where
T: TryFrom<ProduceFailure<T>>,
G: Clone,
[src]
T: TryFrom<ProduceFailure<T>>,
G: Clone,