pub fn build(
        &self,
        command: &mut process::Command,
    ) -> Result<CommandReader, CommandError> {
        let mut child = command
            .stdout(process::Stdio::piped())
            .stderr(process::Stdio::piped())
            .spawn()?;
        let stdout = child.stdout.take().unwrap();
        let stderr =
            if self.async_stderr {
                StderrReader::async(child.stderr.take().unwrap())
            } else {
                StderrReader::sync(child.stderr.take().unwrap())
            };
        Ok(CommandReader {
            child: child,
            stdout: stdout,
            stderr: stderr,
            done: false,
        })
    }
/// Build a new streaming reader for the given command's output.
///
/// The caller should set everything that's required on the given command
/// before building a reader, such as its arguments, environment and
/// current working directory. Settings such as the stdout and stderr (but
/// not stdin) pipes will be overridden so that they can be controlled by
/// the reader.
///
/// If there was a problem spawning the given command, then its error is
/// returned.
Build a new streaming reader for the given command's output.
The caller should set everything that's required on the given command
before building a reader, such as its arguments, environment and
current working directory. Settings such as the stdout and stderr (but
not stdin) pipes will be overridden so that they can be controlled by
the reader.

If there was a problem spawning the given command, then its error is
returned.
Build a new streaming reader for the given command ' s output . The caller should set everything that ' s required on the given command before building a reader such as its arguments environment and current working directory . Settings such as the stdout and stderr ( but not stdin ) pipes will be overridden so that they can be controlled by the reader . If there was a problem spawning the given command then its error is returned .
pub fn build(
        &self,
        command: &mut process::Command,
    ) -> Result<CommandReader, CommandError> {
        let mut child = command
            .stdout(process::Stdio::piped())
            .stderr(process::Stdio::piped())
            .spawn()?;
        let stdout = child.stdout.take().unwrap();
        let stderr =
            if self.async_stderr {
                StderrReader::async(child.stderr.take().unwrap())
            } else {
                StderrReader::sync(child.stderr.take().unwrap())
            };
        Ok(CommandReader {
            child: child,
            stdout: stdout,
            stderr: stderr,
            done: false,
        })
    }
pub fn build ( & self , command : & mut process :: Command , ) -> Result < CommandReader , CommandError > { let mut child = command . stdout ( process :: Stdio :: piped ( ) ) . stderr ( process :: Stdio :: piped ( ) ) . spawn ( ) ? ; let stdout = child . stdout . take ( ) . unwrap ( ) ; let stderr = if self . async_stderr { StderrReader :: async ( child . stderr . take ( ) . unwrap ( ) ) } else { StderrReader :: sync ( child . stderr . take ( ) . unwrap ( ) ) } ; Ok ( CommandReader { child : child , stdout : stdout , stderr : stderr , done : false , } ) }
Build a new streaming reader for the given command's output.
Build a new streaming reader for the given command ' s output .
&self
command
&mut process::Command
&self
command
&mut process::Command