Struct checked_command::CheckedCommand [] [src]

pub struct CheckedCommand { /* fields omitted */ }

A wrapper around std::process::Command which hides the original status/output methods and replaces them with the versions from checked_command::CommandExt

Methods

impl CheckedCommand
[src]

return a mutable reference to the wrapped std::process::Command this can be useful if the cammand has to be passed to a function or to access a extension trait for std::process::Command

converts this Command into a std::process::Command (basically unwrapping it).

Note that this function was intentionally provided instead of Into<Command> as the main reason for this wrapper is to prevent forgetting to check the exit status. As such it will forward all calls except spawn,status and output which normally tend to be the last function ever called on a command instances. Therefore converting a CheckedCommand to a Command is quite likely a bug. (Through there are some cases where it makes sense).

creates a new CheckedCommand see std::process:Command::new for more details

calls std::process::Command::arg

calls std::process::Command::args

calls std::process::Command::env

calls std::process::Command::env_remove

calls std::process::Command::env_clear

calls std::process::Command::current_dir

calls std::process::Command::stdin

calls std::process::Command::stdout

calls std::process::Command::stderr

calls std::process::Command::spawn and converts the Child into a CheckedChild

calls CommandExt::checked_output on the wrapped Command

calls CommandExt::checked_status on the wrapped Command

Trait Implementations

impl Debug for CheckedCommand
[src]

Formats the value using the given formatter.

impl From<Command> for CheckedCommand
[src]

Performs the conversion.