pub struct ScriptOptions {
pub runner: Option<String>,
pub runner_args: Option<Vec<String>>,
pub working_directory: Option<PathBuf>,
pub input_redirection: IoOptions,
pub output_redirection: IoOptions,
pub exit_on_error: bool,
pub print_commands: bool,
pub env_vars: Option<HashMap<String, String>>,
}
Expand description
Options available for invoking the script
Fields§
§runner: Option<String>
Defines the requested runner (defaults to cmd in windows and sh for other platforms)
runner_args: Option<Vec<String>>
Args for the runner (for cmd, /C will automatically be added at the end)
working_directory: Option<PathBuf>
The working directory of the invocation
input_redirection: IoOptions
Default is IoOptions::Inherit
output_redirection: IoOptions
Default is IoOptions::Pipe (only pipe enables to capture the output)
exit_on_error: bool
Sets -e flag. Will exit on any error while running the script (not available for windows)
print_commands: bool
Sets -x flag for printing each script command before invocation (not available for windows)
env_vars: Option<HashMap<String, String>>
Environment environment variables to add before invocation
Implementations§
Source§impl ScriptOptions
impl ScriptOptions
Sourcepub fn new() -> ScriptOptions
pub fn new() -> ScriptOptions
Returns new instance
Trait Implementations§
Source§impl Clone for ScriptOptions
impl Clone for ScriptOptions
Source§fn clone(&self) -> ScriptOptions
fn clone(&self) -> ScriptOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ScriptOptions
impl Debug for ScriptOptions
Source§impl PartialEq for ScriptOptions
impl PartialEq for ScriptOptions
impl StructuralPartialEq for ScriptOptions
Auto Trait Implementations§
impl Freeze for ScriptOptions
impl RefUnwindSafe for ScriptOptions
impl Send for ScriptOptions
impl Sync for ScriptOptions
impl Unpin for ScriptOptions
impl UnwindSafe for ScriptOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more