winpty-rs-windows-future

Crates.iowinpty-rs-windows-future
lib.rswinpty-rs-windows-future
version0.2.1
created_at2025-08-04 22:00:27.839885+00
updated_at2025-08-04 22:00:27.839885+00
descriptionWindows async types
homepage
repositoryhttps://github.com/microsoft/windows-rs
max_upload_size
id1781262
size141,279
Edgar Andrés Margffoy Tuay (andfoy)

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.winpty-rs-windows-future]
version = "0.2"

Use the Windows async types as needed:

use winpty_rs_windows_future::*;
use winpty_rs_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: 1734

cargo fmt