[][src]Module postage::broadcast

The broadcast channel provides multi-sender, multi-receiver message dispatch. All receivers are sent every message. The channel has a fixed capacity, and senders are suspended if the buffer is filled.

When a receiver is cloned, both receivers will observe the same series of messages.

Senders also provide a subscribe() method which adds a receiver on the oldest value.

Structs

Receiver

A broadcast receiver that can be used with the postage::Stream trait.

Sender

A broadcast sender that can be used with the postage::Sink trait. Can be cloned.

Functions

channel

Constructs a pair of broadcast endpoints, with a fixed-size buffer of the given capacity