windows-future

Crates.iowindows-future
lib.rswindows-future
version0.3.1
created_at2025-02-10 20:05:42.906954+00
updated_at2025-09-25 18:10:16.220234+00
descriptionWindows async types
homepage
repositoryhttps://github.com/microsoft/windows-rs
max_upload_size
id1550627
size135,256
Kenny Kerr (kennykerr)

documentation

README

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.3"

Use the Windows async types as needed:

use windows_future::*;

// This result will be available immediately.
let ready = IAsyncOperation::ready(Ok(123));
assert_eq!(ready.join().unwrap(), 123);

let ready = IAsyncOperation::spawn(|| {
    // Some lengthy operation goes here...
    Ok(456)
});

assert_eq!(ready.join().unwrap(), 456);
Commit count: 1734

cargo fmt