Registry / async / cooked-waker

cooked-waker

JSON →
library5.0.0rscratesunverified

A safe interface for creating async Wakers.

# Cargo.toml [dependencies] cooked-waker = "5.0.0"
INSTALL
IMPORT
SIG · COOKED-WAKER
C
cooked-waker
asyncrustv5.0.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.

WakeRef
use cooked_waker::WakeRef;

Create a custom async Waker

use cooked_waker::WakeRef; use std::task::{Context, Poll}; use std::future::Future; struct MyWaker; impl WakeRef for MyWaker { fn wake_by_ref(&self) { println!("Woken!"); } } fn main() { let waker = cooked_waker::into_waker(MyWaker); let mut cx = Context::from_waker(&waker); // Use cx with a future }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
5.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
34
Resources
cooked-waker — cargo add cooked-waker · libregistry