pub struct OneshotChannel<T>(/* private fields */);
Expand description
An unsynchronized (!Sync
), asynchronous oneshot channel.
This is useful for asynchronously handing a single value from one future to another.
Implementations§
Source§impl<T> OneshotChannel<T>
impl<T> OneshotChannel<T>
Sourcepub fn split(&mut self) -> (SenderRef<'_, T>, ReceiverRef<'_, T>)
pub fn split(&mut self) -> (SenderRef<'_, T>, ReceiverRef<'_, T>)
Splits the channel into borrowing SenderRef
and ReceiverRef
handles.