pub struct OperationCompletionWatch { /* private fields */ }Expand description
One watcher for a terminal lifecycle outcome.
Implementations§
Source§impl OperationCompletionWatch
impl OperationCompletionWatch
Sourcepub fn channel() -> (Sender<OperationTerminalOutcome>, OperationCompletionWatch)
pub fn channel() -> (Sender<OperationTerminalOutcome>, OperationCompletionWatch)
Create a pending watch and its sender.
Sourcepub async fn wait(self) -> OperationTerminalOutcome
pub async fn wait(self) -> OperationTerminalOutcome
Await the operation’s terminal outcome.
Sourcepub fn already_resolved(outcome: OperationTerminalOutcome) -> Self
pub fn already_resolved(outcome: OperationTerminalOutcome) -> Self
Create a watch that is already resolved.
Auto Trait Implementations§
impl Freeze for OperationCompletionWatch
impl !RefUnwindSafe for OperationCompletionWatch
impl Send for OperationCompletionWatch
impl Sync for OperationCompletionWatch
impl Unpin for OperationCompletionWatch
impl UnsafeUnpin for OperationCompletionWatch
impl !UnwindSafe for OperationCompletionWatch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more