Skip to main content

oneshot

Function oneshot 

Source
pub fn oneshot<T>() -> Option<(GenericOneshotSender<T>, GenericOneshotReceiver<T>)>
where T: for<'de> Deserialize<'de> + Serialize,
Expand description

Creates a oneshot generic channel used to send only a single message, similar tokio::sync::oneshot. This is not the same as ipc_channel::oneshot. The send and receive methods will consume the Sender/Receiver. We will automatically select ipc or crossbeam channels.