Registry / async / futures-bounded

futures-bounded

JSON →
library0.3.0rscratesunverified

Utilities for bounding futures in size and time.

# Cargo.toml [dependencies] futures-bounded = "0.3.0"
INSTALL
IMPORT
SIG · FUTURES-BOUNDED
F
futures-bounded
asyncrustv0.3.0
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.

Timeout
use futures_bounded::Timeout;

Run a future with a timeout.

use futures_bounded::Timeout; use std::time::Duration; async fn example() { let timeout = Timeout::new(Duration::from_secs(5)); let result = timeout.timeout(async { "done" }).await; println!("{:?}", result); }
Debug
Known issues
gotchaRequires an async runtime like tokio or async-std.
fix
Add a runtime dependency and use #[tokio::main] or similar.
affects: >=0.3.0
Upgrade
Version history
0.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
26
OpenAI (training)
1
Resources
futures-bounded — cargo add futures-bounded · libregistry