4 releases (2 breaking)
new 0.2.0 | Mar 18, 2025 |
---|---|
0.1.2 |
|
0.1.1 | Feb 21, 2025 |
0.1.0 | Feb 21, 2025 |
0.0.0 | Feb 10, 2025 |
#376 in Windows APIs
200,436 downloads per month
Used in 370 crates
(via windows)
290KB
7K
SLoC
Windows async types
The windows-future crate provides stock async support for Windows APIs.
Start by adding the following to your Cargo.toml file:
[dependencies.windows-future]
version = "0.2"
Use the Windows async types as needed:
use windows_future::*;
use windows_result::*;
fn main() -> Result<()> {
// This result will be available immediately.
let ready = IAsyncOperation::ready(Ok(123));
assert_eq!(ready.get()?, 123);
let ready = IAsyncOperation::spawn(|| {
// Some lengthy operation goes here...
Ok(456)
});
assert_eq!(ready.get()?, 456);
Ok(())
}
Dependencies
~240–680KB
~16K SLoC