windows-future

Crates.iowindows-future
lib.rswindows-future
version
sourcesrc
created_at2025-02-10 20:05:42.906954+00
updated_at2025-03-18 19:10:36.958321+00
descriptionWindows async types
homepage
repositoryhttps://github.com/microsoft/windows-rs
max_upload_size
id1550627
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
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.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(())
}
Commit count: 1594

cargo fmt