Module market::channel[][src]

Implements Producer and Consumer for various types of channels.

A channel is the most generic implementation of a market. A channel manages the exchange of goods from one or more Producers to one or more Consumers.

Structs

Crossbeam

A channel as implemented by crossbeam_channel with a good of G.

Std

A channel as implemented by std::sync::mpsc with a good of G.

WithdrawnDemand

A fault thrown when attempting to produce to a channel with no Consumers.

WithdrawnSupply

A fault thrown when attempting to consume from a channel with an empty stock and no Producers.

Enums

Size

The size of the stock of a channel.

StdProducer

One of the senders implemented by std::sync::mpsc.

Structure

Defines how many Producers and Consumers a channel has.

Traits

Style

Describes the style or implementation of a channel.

Functions

create

Creates a channel of S Style with a max stock of size.

Type Definitions

CrossbeamConsumer

The Consumer of a crossbeam channel.

CrossbeamProducer

The Producer of a crossbeam channel.