Skip to main content

BoxInvocation

Struct BoxInvocation 

Source
pub struct BoxInvocation<'a> {
    pub program: &'a Path,
    pub args: &'a [String],
    pub cwd: &'a Path,
    pub environment: &'a BTreeMap<String, String>,
    pub stdin: StdioMode,
    pub stdout: StdioMode,
    pub stderr: StdioMode,
}
Expand description

What would be spawned, once the trust chain has finished and the environment is resolved.

This exists so the decision to spawn and the act of spawning are separable. A test can then assert the exact argument vector, working directory and environment a box would run with — including that no shell is involved — without a process ever starting.

Fields§

§program: &'a Path

The box’s own interpreter.

§args: &'a [String]

Arguments, in the order the release and the caller fixed.

§cwd: &'a Path

The working directory, always the box root.

§environment: &'a BTreeMap<String, String>

The complete environment the child receives.

§stdin: StdioMode

Where standard input comes from.

§stdout: StdioMode

Where standard output goes.

§stderr: StdioMode

Where standard error goes.

Auto Trait Implementations§

§

impl<'a> Freeze for BoxInvocation<'a>

§

impl<'a> RefUnwindSafe for BoxInvocation<'a>

§

impl<'a> Send for BoxInvocation<'a>

§

impl<'a> Sync for BoxInvocation<'a>

§

impl<'a> Unpin for BoxInvocation<'a>

§

impl<'a> UnsafeUnpin for BoxInvocation<'a>

§

impl<'a> UnwindSafe for BoxInvocation<'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.