Registry / async / futures-channel-preview

futures-channel-preview

JSON →
library0.2.2rscratesunverified

Channels for asynchronous communication using futures-rs.

# Cargo.toml [dependencies] futures-channel-preview = "0.2.2"
INSTALL
IMPORT
SIG · FUTURES-CHANNEL-PR
F
futures-channel-preview
asyncrustv0.2.2
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 futures_channel::mpsc::channel;

Creates an MPSC channel and sends/receives a message.

use futures_channel::mpsc; use futures::executor::block_on; async fn send_recv() { let (mut tx, mut rx) = mpsc::channel::<i32>(1); tx.try_send(42).unwrap(); let val = rx.next().await.unwrap(); println!("{}", val); } fn main() { block_on(send_recv()); }
Debug
Known issues
breakingThis crate is a preview and may be unstable; prefer the stable futures-channel crate.
fix
Replace with futures-channel from the futures crate.
affects: >=0.1.0
Upgrade
Version history
0.2.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
26
Resources
futures-channel-preview — cargo add futures-channel-preview · libregistry