pub fn oneshot_channel<T>() -> (OneshotSender<T>, OneshotReceiver<T>)where
    T: Send,
Expand description

Creates a new oneshot channel.

Refer to generic_oneshot_channel for details.

Example for creating a channel to transmit an integer value:

let (sender, receiver) = oneshot_channel::<i32>();