pub struct RunOptions<'a> {
pub args: Vec<String>,
pub env: Vec<(String, String)>,
pub stdin: StdioMode,
pub stdout: StdioMode,
pub stderr: StdioMode,
pub signals: Option<&'a SignalReceiver>,
pub on_environment_report: Option<&'a dyn Fn(&EnvironmentReport)>,
pub environment: EnvironmentReportOptions,
pub host_environment: Option<Vec<(String, String)>>,
pub spawn: Option<&'a dyn SpawnBox>,
}Expand description
How a box should be run.
Fields§
§args: Vec<String>Arguments appended after the release’s own defaultArgs.
env: Vec<(String, String)>Values merged over the inherited environment, and beneath the signed release’s.
stdin: StdioModeWhere the child’s standard input comes from.
stdout: StdioModeWhere the child’s standard output goes.
stderr: StdioModeWhere the child’s standard error goes.
signals: Option<&'a SignalReceiver>A channel this run forwards signals from, if the caller wants forwarding.
on_environment_report: Option<&'a dyn Fn(&EnvironmentReport)>Called once the environment is resolved and before the child starts.
environment: EnvironmentReportOptionsHow much of the environment to describe.
host_environment: Option<Vec<(String, String)>>The inherited environment. Defaults to this process’s, and is injectable so a test can state a host environment instead of mutating the one every thread in the process shares.
spawn: Option<&'a dyn SpawnBox>How the box is started. Defaults to a real process.
Trait Implementations§
Source§impl<'a> Default for RunOptions<'a>
impl<'a> Default for RunOptions<'a>
Source§fn default() -> RunOptions<'a>
fn default() -> RunOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RunOptions<'a>
impl<'a> !Send for RunOptions<'a>
impl<'a> !Sync for RunOptions<'a>
impl<'a> !UnwindSafe for RunOptions<'a>
impl<'a> Freeze for RunOptions<'a>
impl<'a> Unpin for RunOptions<'a>
impl<'a> UnsafeUnpin for RunOptions<'a>
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