[][src]Module channel::libra_channel

libra_channel provides an mpsc channel which has two ends libra_channel::Receiver and libra_channel::Sender similar to existing mpsc data structures. What makes it different from existing mpsc channels is that we have full control over how the internal queueing in the channel happens and how we schedule messages to be sent out from this channel. Internally, it uses the PerKeyQueue to store messages

Structs

Receiver

The receiving end of the libra_channel.

Sender

The sending end of the libra_channel.

Enums

ElementStatus

The status of an element inserted into a libra_channel. If the element is successfully dequeued, ElementStatus::Dequeued is sent to the sender. If it is dropped ElementStatus::Dropped is sent to the sender along with the dropped element.

Functions

new

Create a new Libra Channel and returns the two ends of the channel.