|0.1.0||Apr 1, 2021|
#19 in #session
Used in 2 crates
This crate contains the Tokio/MPSC backend for Dialectic. It
supports send/receive operations over all types which are
Send + Any. This is useful for
inter-task and inter-thread communication, especially if you're working on a protocol which needs to
be tested locally and is written to be backend-agnostic. There are a few important types:
dialectic_tokio_mpsc::Chan<P>synonym is a quick type synonym for a channel which uses a bounded MPSC
Receiverpair, and analogously the
dialectic_tokio_mpsc::UnboundedChan<P>provides a similar functionality for unbounded MPSC channels.
UnboundedSendertypes transparently wrap the underlying MPSC receiver/sender types. If not for the orphan rules, Dialectic's
Receivetraits would be directly implemented on the
tokio::mpsctypes, but Rust does not allow that.
unbounded_channel()are provided for conveniently constructing pairs of these transport types.