Module cradle::input [−][src]
Expand description
The Input
trait that defines all possible inputs to a child process.
Structs
By default child processes inherit the current directory from their
parent. You can override this with CurrentDir
:
Adds an environment variable to the environment of the child process.
Passing in LogCommand
as an argument to cradle
will cause it
to log the commands (including all arguments) to stderr
.
(This is similar bash
’s -x
option.)
Splits the contained string by whitespace (using split_whitespace
)
and uses the resulting words as separate arguments.
Writes the given byte slice to the child’s standard input.
Traits
All types that are possible arguments to run!
, run_output!
or
run_result!
must implement this trait.
This makes cradle
very flexible.
For example you can pass in an executable as a String,
and a variable number of arguments as a Vec
: