pub trait ProcessHandle: Send {
// Required methods
fn output(
&mut self,
) -> Option<BoxStream<'static, Result<OutputChunk, ExecError>>>;
fn kill(&mut self) -> BoxFuture<'_, ()>;
fn wait(&mut self) -> BoxFuture<'_, Result<ExitStatus, ExecError>>;
}Expand description
A process that has started.
Required Methods§
Sourcefn output(
&mut self,
) -> Option<BoxStream<'static, Result<OutputChunk, ExecError>>>
fn output( &mut self, ) -> Option<BoxStream<'static, Result<OutputChunk, ExecError>>>
The output, incrementally. None after the first call — the stream
owns the pipes.
Streaming is a requirement, not an optimization. A long-running command’s output reaches the user while it runs; a provider that returned everything at the end would remove that silently.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".