Windows-rs: Support for async

Created on 27 Apr 2020  路  5Comments  路  Source: microsoft/windows-rs

Need to integrate Rust's async-await support with WinRT's async support via its IAsyncXxx interfaces.

enhancement

Most helpful comment

I have a proof-of-concept prototype implementation for winrt-rust in the branch https://github.com/Boddlnagg/winrt-rust/tree/futures-preview ... maybe this helps ;-)

All 5 comments

I have a proof-of-concept prototype implementation for winrt-rust in the branch https://github.com/Boddlnagg/winrt-rust/tree/futures-preview ... maybe this helps ;-)

Whoever implements this, make sure its compatible with tokio please.

error[E0277]: the trait bound `std::result::Result<windows::foundation::IAsyncOperation<windows::devices::enumeration::DeviceInformationCollection>, winrt::error::Error>: core::future::future::Future` is not satisfied
  --> src\lib.rs:18:20
   |
18 |     let _devices = DeviceInformation::find_all_async_device_class(DeviceClass::AudioCapture).await;
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `core::future::future::Future` is not implemented for `std::result::Result<windows::foundation::IAsyncOperation<windows::devices::enumeration::DeviceInformationCollection>, winrt::error::Error>`

@eklipse2k8 there should be a ? before .await operator

@eklipse2k8 Support for .await hasn't been implemented yet.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tim-weis picture tim-weis  路  3Comments

rylev picture rylev  路  4Comments

ctaggart picture ctaggart  路  4Comments

13r0ck picture 13r0ck  路  4Comments

AyashiNoCeres picture AyashiNoCeres  路  4Comments