Registry / async / oneshot

oneshot

JSON →
library0.2.1rscratesunverified

Oneshot spsc channel with (potentially) lock-free non-blocking send, and a receiver supporting both thread blocking receive operations as well as Future based async polling.

# Cargo.toml [dependencies] oneshot = "0.2.1"
INSTALL
IMPORT
SIG · ONESHOT
O
oneshot
asyncrustv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

channel
use oneshot::channel;

Create a oneshot channel, send a value, and receive it.

use oneshot::channel; fn main() { let (tx, rx) = channel(); tx.send(42).unwrap(); assert_eq!(rx.recv(), Ok(42)); }
Debug
Known issues
gotchaSend fails if receiver is dropped before send.
fix
Ensure receiver lives until send completes or handle SendError.
affects: >=0.1.0
Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
32
Amazon
1
Resources
oneshot — cargo add oneshot · libregistry