pub enum WaitForCompletionResult<T = ExitStatus> {
Completed(T),
Timeout {
timeout: Duration,
},
}Expand description
Result of waiting for a process to complete within an explicit timeout.
Variants§
Completed(T)
The process completed before the timeout elapsed.
Timeout
The timeout elapsed before the process completed.
Implementations§
Source§impl<T> WaitForCompletionResult<T>
impl<T> WaitForCompletionResult<T>
Sourcepub fn into_completed(self) -> Option<T>
pub fn into_completed(self) -> Option<T>
Returns the completed value, or None if the wait timed out.
Sourcepub fn expect_completed(self, message: &str) -> T
pub fn expect_completed(self, message: &str) -> T
Returns the completed value, panicking with message if the wait timed out.
§Panics
Panics with message if this result is WaitForCompletionResult::Timeout.
Trait Implementations§
Source§impl<T: Clone> Clone for WaitForCompletionResult<T>
impl<T: Clone> Clone for WaitForCompletionResult<T>
Source§fn clone(&self) -> WaitForCompletionResult<T>
fn clone(&self) -> WaitForCompletionResult<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for WaitForCompletionResult<T>
impl<T: Debug> Debug for WaitForCompletionResult<T>
Source§impl<T: PartialEq> PartialEq for WaitForCompletionResult<T>
impl<T: PartialEq> PartialEq for WaitForCompletionResult<T>
impl<T: Copy> Copy for WaitForCompletionResult<T>
impl<T: Eq> Eq for WaitForCompletionResult<T>
impl<T> StructuralPartialEq for WaitForCompletionResult<T>
Auto Trait Implementations§
impl<T> Freeze for WaitForCompletionResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for WaitForCompletionResult<T>where
T: RefUnwindSafe,
impl<T> Send for WaitForCompletionResult<T>where
T: Send,
impl<T> Sync for WaitForCompletionResult<T>where
T: Sync,
impl<T> Unpin for WaitForCompletionResult<T>where
T: Unpin,
impl<T> UnsafeUnpin for WaitForCompletionResult<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WaitForCompletionResult<T>where
T: UnwindSafe,
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