Registry / async / async-oneshot

async-oneshot

JSON →
library0.5.9rscratesunverified

A fast, small, full-featured, async-aware oneshot channel.

# Cargo.toml [dependencies] async-oneshot = "0.5.9"
INSTALL
IMPORT
SIG · ASYNC-ONESHOT
A
async-oneshot
asyncrustv0.5.9
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.

oneshot
use async_oneshot::oneshot;

Create and use an async oneshot channel to send a single value.

use async_oneshot::oneshot; let (sender, receiver) = oneshot::<i32>(); sender.send(42).unwrap(); let value = receiver.await.unwrap(); println!("Received: {}", value);
Debug
Known issues
gotchaRequires an async runtime (e.g., tokio, async-std) to await the receiver.
fix
Ensure you are using an async runtime and have the appropriate executor.
affects: >=0.5.0
Upgrade
Version history
0.5.9latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
43 hits · last 30 days
node
38
Amazon
1
Resources
async-oneshot — cargo add async-oneshot · libregistry