[][src]Trait pwner::Spawner

pub trait Spawner {
    type Output: Process;
    fn spawn_owned(&mut self) -> Result<Self::Output>;
}

A process builder, providing the wrapped handle, as well as piped handles to stdin, stdout, and stderr.

The handle also implements a clean shutdown of the process upon destruction.

Associated Types

Loading content...

Required methods

fn spawn_owned(&mut self) -> Result<Self::Output>

Executes the command as a child process, returning a handle to it.

Upon creation, stid, stdout, and stderr are piped and kept by the handle.

Examples

Basic usage:

use std::process::Command;
use pwner::Spawner;

Command::new("ls")
        .spawn_owned()
        .expect("ls command failed to start");

Errors

Loading content...

Implementations on Foreign Types

impl Spawner for Command[src]

type Output = Process

impl Spawner for Command[src]

type Output = Process

Loading content...

Implementors

Loading content...