Skip to main content

DeclaredCommandWorld

Trait DeclaredCommandWorld 

Source
pub trait DeclaredCommandWorld {
    // Required methods
    fn close_standard_input(&mut self);
    fn clear_environment(&mut self);
    fn set_variable(&mut self, name: &OsStr, value: &OsStr);
}
Expand description

A process builder that can be placed in the declared-command world.

Implemented for both process builders this workspace spawns declared commands with — std::process::Command for the synchronous CLI runner and tokio::process::Command for the activity executors — so place_in_declared_world is one function rather than one per builder. The trait carries only what the world is made of; nothing here can express a working directory or an argument, which is what stops it growing into a second command builder.

Required Methods§

Source

fn close_standard_input(&mut self)

Close standard input: the child reads end-of-file immediately.

Source

fn clear_environment(&mut self)

Remove every variable the host holds.

Source

fn set_variable(&mut self, name: &OsStr, value: &OsStr)

Bind name to value, replacing any binding of that name already set.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl DeclaredCommandWorld for Command

Source§

fn close_standard_input(&mut self)

Source§

fn clear_environment(&mut self)

Source§

fn set_variable(&mut self, name: &OsStr, value: &OsStr)

Source§

impl DeclaredCommandWorld for Command

Source§

fn close_standard_input(&mut self)

Source§

fn clear_environment(&mut self)

Source§

fn set_variable(&mut self, name: &OsStr, value: &OsStr)

Implementors§