Crate dialectic_tokio_mpsc[][src]

This crate provides a backend implementation for the dialectic crate using tokio::sync::mpsc channels carrying boxed values Box<dyn Any + Send>, which are downcast to their true type (inferred from the session type) on the other end of the channel. Select this backend if you’re using the Tokio runtime for asynchrony and you only need to communicate between tasks in the same process.

Structs

Receiver

A bounded receiver for dynamically typed values. See tokio::sync::mpsc::Receiver.

SendError

Error returned by the Sender.

Sender

A bounded sender for dynamically typed values. See tokio::sync::mpsc::Sender.

UnboundedReceiver

An unbounded receiver for dynamically typed values. See tokio::sync::mpsc::UnboundedReceiver.

UnboundedSender

An unbounded sender for dynamically typed values. See tokio::sync::mpsc::UnboundedSender.

Enums

Error

An error thrown while receiving from or sending to a dynamically typed tokio::sync::mpsc channel.

RecvError

An error thrown while receiving from a dynamically typed tokio::sync::mpsc channel.

Functions

channel

Create a bounded mpsc channel for transporting dynamically typed values.

unbounded_channel

Create an unbounded mpsc channel for transporting dynamically typed values.

Type Definitions

Chan

Shorthand for a Chan using a bounded Sender and Receiver.

UnboundedChan

Shorthand for a Chan using an unbounded UnboundedSender and UnboundedReceiver.