pub trait SandboxProcess: Send {
// Required methods
fn pid(&self) -> Option<u32>;
fn take_stdout(&mut self) -> Option<ByteStream>;
fn take_stderr(&mut self) -> Option<ByteStream>;
fn wait(&mut self) -> BoxFuture<'_, Result<i32>>;
fn kill(&mut self) -> BoxFuture<'_, Result<()>>;
}Expand description
A running process started with Sandbox::spawn.
Implementations must make kill idempotent and let wait be called
after the output streams were taken.
Required Methods§
Sourcefn take_stdout(&mut self) -> Option<ByteStream>
fn take_stdout(&mut self) -> Option<ByteStream>
Takes the standard output stream (once).
Sourcefn take_stderr(&mut self) -> Option<ByteStream>
fn take_stderr(&mut self) -> Option<ByteStream>
Takes the standard error stream (once).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".