[−][src]Crate postage
The feature-rich, portable async channel library.
Why use Postage?
- Includes a rich set of channels.
mpsc
, a multi-producer, single-consumer channelbroadcast
, a lossless multi-producer, multi-consumer broadcast channel with backpressure (no lagging!)watch
, a state distribution channel with a value that can be borrowed.oneshot
, a oneshot transfer channel.barrier
, a oneshot channel that transmits when the sender half is dropped.
- Works with any executor.
- Currently regressions are written for
tokio
andasync-std
.
- 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 Stream and Sink 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.
Postage is in beta quality. The functionality is implemented and has unit/integration test coverage. But it needs to be tested on more hardware, and more operating systems.
See the readme for benchmarks.
Modules
barrier | Barriers transmit when the sender half is dropped, and can synchronize events in async tasks. |
broadcast | Provides a lossless, MPMC channel. All receivers are guaranteed to recieve each message. |
mpsc | A fixed-capacity multi-producer, single-consumer channel. |
oneshot | Oneshot channels transmit a single value between a sender and a reciever. |
prelude | Imports the Sink and Stream traits. |
sink | A sink for values which are asynchronously accepted, until the target is closed. |
stream | A stream of values which are asynchronously produced, until the source is closed. |
watch | A state distribution channel. The internal state can be borrowed or cloned, but receivers do not observe every value. |
Structs
Context | The |