#[non_exhaustive]pub enum WaitOutcome<T> {
Finished(T),
TimedOut {
last: Option<T>,
},
Vanished {
last: T,
},
}Expand description
The result of waiting. A finished state can still describe a failure, such as an action where some agents failed; inspect it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Finished(T)
TimedOut
The deadline passed. last is the most recent state observed, if any.
Vanished
The resource was observed and then could no longer be found, for
example because it was deleted or fell outside the searched window.
last is the final state observed.
Fields
§
last: TImplementations§
Source§impl<T> WaitOutcome<T>
impl<T> WaitOutcome<T>
Sourcepub fn finished(self) -> Option<T>
pub fn finished(self) -> Option<T>
Returns the state only for Self::Finished. This says that waiting ended,
not that the operation succeeded. Use Self::last to inspect a state
retained after a timeout or disappearance.
Trait Implementations§
Source§impl<T: Clone> Clone for WaitOutcome<T>
impl<T: Clone> Clone for WaitOutcome<T>
Auto Trait Implementations§
impl<T> Freeze for WaitOutcome<T>
impl<T> RefUnwindSafe for WaitOutcome<T>
impl<T> Send for WaitOutcome<T>
impl<T> Sync for WaitOutcome<T>
impl<T> Unpin for WaitOutcome<T>
impl<T> UnsafeUnpin for WaitOutcome<T>
impl<T> UnwindSafe for WaitOutcome<T>
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