[−][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 |
sync | Implements synchronization items. |
thread | Implements |
Structs
ClosedMarketFault | An error interacting with a market due to the market being closed. |
Collector | A |
Distributor | Distributes goods to multiple producers. |
PermanentQueue | An unlimited queue with a producer and consumer that are always functional. |
Recall | Returns a good that a |
UnlimitedQueue | Defines a queue with unlimited size that implements |
VigilantConsumer | Consumes goods that an |
Enums
ConsumeFailure | A |
Never | A type that can never be constructed. |
ProduceFailure | A |
Traits
Consumer | Retrieves goods from a market. |
Inspector | Inspects if goods meet defined requirements. |
Producer | Stores goods in a market. |