Skip to main content

CommandExt

Trait CommandExt 

Source
pub trait CommandExt {
    // Required methods
    fn status2(&mut self) -> Result<TestStatus, Report>;
    fn output2(&mut self) -> Result<TestOutput<NoDir>, Report>;
    fn spawn2<T>(
        &mut self,
        dir: T,
        command_path: impl ToString,
    ) -> Result<TestChild<T>, Report>;
}
Expand description

Wrappers for Command methods to integrate with zebra_test.

Required Methods§

Source

fn status2(&mut self) -> Result<TestStatus, Report>

wrapper for status fn on Command that constructs informative error reports

Source

fn output2(&mut self) -> Result<TestOutput<NoDir>, Report>

wrapper for output fn on Command that constructs informative error reports

Source

fn spawn2<T>( &mut self, dir: T, command_path: impl ToString, ) -> Result<TestChild<T>, Report>

Spawns a command with informative errors and owned descendant cleanup.

On Unix, children that leave the process group are outside the cleanup boundary. Callers must not externally reap the leader or enable SIGCHLD auto-reaping. On Windows, creation flags must remain at their default zero; the child starts suspended so its job is attached before command execution. Job assignment restrictions cause an error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CommandExt for Command

Source§

fn status2(&mut self) -> Result<TestStatus, Report>

wrapper for status fn on Command that constructs informative error reports

Source§

fn output2(&mut self) -> Result<TestOutput<NoDir>, Report>

wrapper for output fn on Command that constructs informative error reports

Source§

fn spawn2<T>( &mut self, dir: T, command_path: impl ToString, ) -> Result<TestChild<T>, Report>

wrapper for spawn fn on Command that constructs informative error reports using the original command_path

Implementors§