async_helpers::responding_channel

Function channel

Source
pub fn channel<Req, Resp>(
    buffer: usize,
) -> (Sender<Req, Resp>, Receiver<Req, Resp>)
Expand description

Create a new asynchronous channel with a bounded capacity, returning the sender/receiver halves.

This channel follows the semantics of a futures::mpsc::channel when at capacity.