Go to file
John Nunley 4c18540fb4
Add smol-rs logo (#8)
2023-07-17 14:30:05 +09:00
.github Reimplement using 100% safe code (#7) 2023-06-11 08:27:36 -07: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 Bump to v1.1.0 2020-08-26 23:31:50 +02:00
Cargo.toml Reimplement using 100% safe code (#7) 2023-06-11 08:27:36 -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.