Expand description
The feature-rich, portable async channel library.
Why use Postage?
- Includes a rich set of channels.
- barrier, a oneshot channel that transmits when the sender half is dropped.
- broadcast, a lossless multi-producer, multi-consumer broadcast channel with backpressure (no lagging!).
- dispatch, a multi-producer, multi-consumer queue.
- mpsc, a multi-producer, single-consumer channel.
- oneshot, a oneshot transfer channel.
- watch, a state distribution channel with a value that can be borrowed.
- Works with any executor.
- Currently regressions are written for
tokio
andasync-std
. - With the
futures-traits
feature, channels implement the futuresSink/Stream
traits.
- Currently regressions are written for
- Throughly tested.
- Channels have full unit test coverage, and integration test coverage with multiple async executors.
- Comes with built-in Sink and Stream combinators.
- Sinks can be chained, and filtered.
- Streams can be chained, filtered, mapped, and merged.
- With the
logging
feature, Sinks and streams can log their values. This is really helpful when debugging applications.
See the readme for benchmarks.
Cargo features:
blocking (default)
- enables Sink::blocking_send and Stream::blocking_recvdebug
- enables extremely verbose internal log statements.futures-traits
- enablesfutures::Sink
andfutures::Stream
implementations for the postage channels. Compatible withv0.3
.logging (default)
- enables the enables Sink::log(Level) and Stream::log(Level) combinators.
Modules
Barriers transmit when the sender half is dropped, and can synchronize events in async tasks.
Provides a lossless, MPMC channel. All receivers are guaranteed to recieve each message.
A fixed-capacity multi-producer, multi-consumer queue. At most one receiver will observe each value.
A fixed-capacity multi-producer, single-consumer channel.
Oneshot channels transmit a single value between a sender and a reciever.
Imports the Sink and Stream traits.
A sink for values which are asynchronously accepted, until the target is closed.
A stream of values which are asynchronously produced, until the source is closed.
A state distribution channel. The internal state can be borrowed or cloned, but receivers do not observe every value.
Structs
The Context
of an asynchronous task.