Skip to main content

ChildProcess

Trait ChildProcess 

trait ChildProcess {
    // Required methods
    async fn wait(&mut self) -> Result<ExitStatus>;
    async fn kill(&mut self) -> Result<()>;
}
Expand description

Testable view of the SSH child process used by shutdown_child.

Required Methods§

async fn wait(&mut self) -> Result<ExitStatus>

Wait until the child exits.

§Returns

The child’s ExitStatus, or the error reported while waiting.

async fn kill(&mut self) -> Result<()>

Force-kill the child and wait until it has terminated.

§Returns

Ok(()) once terminated, or the error reported by the kill.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl ChildProcess for Child

§

async fn wait(&mut self) -> Result<ExitStatus>

§

async fn kill(&mut self) -> Result<()>

Implementors§