Need to integrate Rust's async-await support with WinRT's async support via its IAsyncXxx interfaces.
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.
Most helpful comment
I have a proof-of-concept prototype implementation for
winrt-rustin the branch https://github.com/Boddlnagg/winrt-rust/tree/futures-preview ... maybe this helps ;-)