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. This channel allows only a fixed capacity and might have other optimizations. The send and receive methods will consume the Sender/Receiver. We will automatically select ipc or crossbeam channels.