Send a value and asynchronously wait for it.
let (tx, rx) = catty::oneshot(); tx.send("Hello!"); assert_eq!(rx.await, Ok("Hello!"));
The sender side has disconnected.
The receiver side of a oneshot channel, created with
The sender side of a oneshot channel, created with
Creates a oneshot channel. A value can be sent into this channel and then be asynchronously waited for.