diff --git a/crates/libs/windows/src/extensions/Foundation/Async.rs b/crates/libs/windows/src/extensions/Foundation/Async.rs index d26cade52d..91b2ca3b6e 100644 --- a/crates/libs/windows/src/extensions/Foundation/Async.rs +++ b/crates/libs/windows/src/extensions/Foundation/Async.rs @@ -236,6 +236,7 @@ impl IntoFuture for IAsyncOperationWithProgress< // impl IAsyncAction { + /// Waits for the `IAsyncAction` to finish. pub fn get(&self) -> Result<()> { if self.Status()? == AsyncStatus::Started { let (_waiter, signaler) = Waiter::new()?; @@ -252,6 +253,7 @@ impl IAsyncAction { } impl IAsyncOperation { + /// Waits for the `IAsyncOperation` to finish. pub fn get(&self) -> Result { if self.Status()? == AsyncStatus::Started { let (_waiter, signaler) = Waiter::new()?; @@ -268,6 +270,7 @@ impl IAsyncOperation { } impl IAsyncActionWithProgress

{ + /// Waits for the `IAsyncActionWithProgress

` to finish. pub fn get(&self) -> Result<()> { if self.Status()? == AsyncStatus::Started { let (_waiter, signaler) = Waiter::new()?; @@ -284,6 +287,7 @@ impl IAsyncActionWithProgress

{ } impl IAsyncOperationWithProgress { + /// Waits for the `IAsyncOperationWithProgress` to finish. pub fn get(&self) -> Result { if self.Status()? == AsyncStatus::Started { let (_waiter, signaler) = Waiter::new()?; diff --git a/crates/libs/windows/src/extensions/Foundation/AsyncReady.rs b/crates/libs/windows/src/extensions/Foundation/AsyncReady.rs index 073c8bf72b..1d26326cbc 100644 --- a/crates/libs/windows/src/extensions/Foundation/AsyncReady.rs +++ b/crates/libs/windows/src/extensions/Foundation/AsyncReady.rs @@ -195,24 +195,28 @@ impl IAsyncOperationWithProgress_Impl for } impl IAsyncAction { + /// Creates an `IAsyncAction` that is immediately ready with a value. pub fn ready(result: Result<()>) -> Self { ReadyAction(ReadyState::new(result)).into() } } impl IAsyncOperation { + /// Creates an `IAsyncOperation` that is immediately ready with a value. pub fn ready(result: Result) -> Self { ReadyOperation(ReadyState::new(result)).into() } } impl IAsyncActionWithProgress

{ + /// Creates an `IAsyncActionWithProgress

` that is immediately ready with a value. pub fn ready(result: Result<()>) -> Self { ReadyActionWithProgress(ReadyState::new(result)).into() } } impl IAsyncOperationWithProgress { + /// Creates an `IAsyncOperationWithProgress` that is immediately ready with a value. pub fn ready(result: Result) -> Self { ReadyOperationWithProgress(ReadyState::new(result)).into() } diff --git a/crates/libs/windows/src/extensions/Foundation/AsyncSpawn.rs b/crates/libs/windows/src/extensions/Foundation/AsyncSpawn.rs index 8f42fbf8b3..ca69073100 100644 --- a/crates/libs/windows/src/extensions/Foundation/AsyncSpawn.rs +++ b/crates/libs/windows/src/extensions/Foundation/AsyncSpawn.rs @@ -245,6 +245,7 @@ impl IAsyncOperationWithProgress_Impl for } impl IAsyncAction { + /// Creates an `IAsyncAction` that waits for the closure to execute on the Windows thread pool. pub fn spawn(f: F) -> Self where F: FnOnce() -> Result<()> + Send + 'static, @@ -261,6 +262,7 @@ impl IAsyncAction { } impl IAsyncOperation { + /// Creates an `IAsyncOperation` that waits for the closure to execute on the Windows thread pool. pub fn spawn(f: F) -> Self where F: FnOnce() -> Result + Send + 'static, @@ -277,6 +279,7 @@ impl IAsyncOperation { } impl IAsyncActionWithProgress

{ + /// Creates an `IAsyncActionWithProgress

` that waits for the closure to execute on the Windows thread pool. pub fn spawn(f: F) -> Self where F: FnOnce() -> Result<()> + Send + 'static, @@ -293,6 +296,7 @@ impl IAsyncActionWithProgress

{ } impl IAsyncOperationWithProgress { + /// Creates an `IAsyncOperationWithProgress` that waits for the closure to execute on the Windows thread pool. pub fn spawn(f: F) -> Self where F: FnOnce() -> Result + Send + 'static,