jsonrpc_pubsub::oneshot

Function channel

Source
pub fn channel<T>() -> (Sender<T>, Receiver<T>)
Expand description

Create a new future-base rendezvous channel.

The returned Sender and Receiver objects are wrapping the regular futures::channel::oneshot counterparts and have the same functionality. Additionaly Sender::send_and_wait allows you to send a message to the channel and get a future that resolves when the message is consumed.