Quellcodebibliothek
Statistik
Leitseite
products
/
Sources
/
formale Sprachen
/
C
/
Firefox
/
third_party
/
rust
/
windows-future
/ (
Firefox Browser
Version 153.0.1
©
) Datei vom 27.6.2026 mit Größe 811 B
Quelle readme.md Sprache: unbekannt
Spracherkennung für: .md vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
## Windows async types
The [windows-future](
https://crates.io/crates/windows-future)
crate provides stock as
ync support for Windows APIs.
* [Getting started](
https://kennykerr.ca/rust-getting-started/)
* [Samples](
https://github.com/microsoft/windows-rs/tree/master/crates/samples)
* [Releases](
https://github.com/microsoft/windows-rs/releases)
Start by adding the following to your Cargo.toml file:
```toml
[dependencies.windows-future]
version = "
0
.
3
"
```
Use the Windows async types as needed:
```rust
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
);
```
[Dauer der Verarbeitung: 0.28 Sekunden, vorverarbeitet 2026-09-28]
2026-10-11