[][src]Function dialectic::backend::mpsc::channel

pub fn channel<'a>(buffer: usize) -> (Sender<'a>, Receiver<'a>)
This is supported on crate feature mpsc only.

Create a bounded mpsc channel for transporting dynamically typed values.

This is shorthand for tokio::sync::mpsc::channel::<Box<dyn Any + Send>>. See tokio::sync::mpsc::channel.

Examples

let (tx, rx) = dialectic::backend::mpsc::channel(1);