[−][src]Crate market
Infrastructure for producers and consumers in a market.
A market is a stock of goods. A producer stores goods in the market while a consumer retrieves goods from the market.
In the rust stdlib, the primary example of a market is std::sync::mpsc::channel
. std::sync::mpsc::Sender
is the producer and std::sync::mpsc::Receiver
is the consumer.
Modules
channel | Implements |
io | Implements |
process | Implements |
Structs
Adapter | A |
ApprovedProducer | Produces goods that an |
ClosedMarketFailure | A failure consuming a good due to the market being closed. |
Collector | A |
ComposingConsumer | Consumes composite goods of type |
NonComposible | The Error thrown when failing to compose parts into a composite good. |
PermanentQueue | An unlimited queue with a producer and consumer that are always functional. |
Recall | An error producing to a market that returns the failed good. |
StrippingConsumer | Consumes parts from a |
StrippingProducer | A |
UnlimitedQueue | Defines a queue with unlimited size that implements |
VigilantConsumer | Consumes goods that an |
Enums
ConsumeError | An error consuming from a market. |
ProduceError | An error producing to a market. |
Traits
ComposeFrom | Converts an array of parts into a composite good. |
Consumer | Retrieves goods from a market. |
Inspector | Inspects if goods meet defined requirements. |
Producer | Stores goods in a market. |
StripFrom | Converts a single good into parts. |