pub enum ExecutionSpawnResult {
Completed(ExecutionResult),
StartedProcess(ChildProcess),
}Expand description
Represents the result of spawning an execution; captures both execution that immediately returns as well as execution that starts a process asynchronously.
Variants§
Completed(ExecutionResult)
Indicates that the execution completed.
StartedProcess(ChildProcess)
Indicates that a process was started and had not yet completed.
Implementations§
Source§impl ExecutionSpawnResult
impl ExecutionSpawnResult
Sourcepub async fn wait(
self,
no_wait: bool,
cancellation_token: Option<&CancellationToken>,
) -> Result<ExecutionWaitResult, Error>
pub async fn wait( self, no_wait: bool, cancellation_token: Option<&CancellationToken>, ) -> Result<ExecutionWaitResult, Error>
Waits for the command to complete.
§Arguments
no_wait- If true, do not wait for the command to complete; return immediately.cancellation_token- Optional token to cancel the wait operation.
Trait Implementations§
Source§impl From<ExecutionResult> for ExecutionSpawnResult
impl From<ExecutionResult> for ExecutionSpawnResult
Source§fn from(result: ExecutionResult) -> Self
fn from(result: ExecutionResult) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExecutionSpawnResult
impl !RefUnwindSafe for ExecutionSpawnResult
impl Send for ExecutionSpawnResult
impl Sync for ExecutionSpawnResult
impl Unpin for ExecutionSpawnResult
impl !UnwindSafe for ExecutionSpawnResult
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more