Go to file
John Nunley 6101041f81
v1.1.1
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-25 10:19:08 -07:00
.github Update actions/checkout action to v4 2023-09-10 18:29:47 +09:00
src Add smol-rs logo (#8) 2023-07-17 14:30:05 +09:00
.gitignore Initial commit 2020-05-16 19:13:55 +02:00
CHANGELOG.md v1.1.1 2023-09-25 10:19:08 -07:00
Cargo.toml v1.1.1 2023-09-25 10:19:08 -07:00
LICENSE-APACHE Initial commit 2020-05-16 19:13:55 +02:00
LICENSE-MIT Initial commit 2020-05-16 19:13:55 +02:00
README.md Update license badge to match Cargo.toml 2021-02-14 13:36:38 +09:00

README.md

waker-fn

Build License Cargo Documentation

Convert closures into wakers.

A Waker is just a fancy callback. This crate converts regular closures into wakers.

Examples

use waker_fn::waker_fn;

let waker = waker_fn(|| println!("woken"));

waker.wake_by_ref(); // Prints "woken".
waker.wake();        // Prints "woken".

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.