Skip to main content

RunOptions

Struct RunOptions 

Source
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: StdioMode

Where the child’s standard input comes from.

§stdout: StdioMode

Where the child’s standard output goes.

§stderr: StdioMode

Where 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: EnvironmentReportOptions

How 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>

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.