Skip to main content

ExecutionRequestBuilder

Struct ExecutionRequestBuilder 

Source
pub struct ExecutionRequestBuilder { /* private fields */ }
Expand description

Builder for an ExecutionRequest.

Implementations§

Source§

impl ExecutionRequestBuilder

Source

pub fn arg(self, argument: impl Into<OsString>) -> Self

Source

pub fn args<I, S>(self, arguments: I) -> Self
where I: IntoIterator<Item = S>, S: Into<OsString>,

Source

pub fn executable_search_path(self, path: impl Into<PathBuf>) -> Self

Adds one executable search directory after existing entries.

Self::build rejects entries that the target platform’s std::env::join_paths cannot serialize, exact duplicates, and requests whose complete child environment (including the resulting mandatory PATH) exceeds MAX_ENVIRONMENT_BLOCK_UNITS.

Source

pub fn trusted_node_runtime(self, path: impl Into<PathBuf>) -> Self

Binds the exact canonical Node executable to the first child PATH directory.

Source

pub fn windows_verbatim_arguments(self, enabled: bool) -> Self

Requires the Windows adapter to use CommandExt::raw_arg or an equivalent verbatim seam.

Source

pub fn allow_process_memory_stats(self, enabled: bool) -> Self

Enables read-only procfs access inside a private PID/mount namespace for this process and its descendants.

Source

pub fn executable_search_paths<I, P>(self, paths: I) -> Self
where I: IntoIterator<Item = P>, P: Into<PathBuf>,

Adds ordered executable search directories without consulting ambient PATH.

Self::build validates every entry’s representation and size before duplicate checks, then applies the target platform’s exact std::env::join_paths serialization rules.

Source

pub fn project_root(self, project_root: impl Into<PathBuf>) -> Self

Source

pub fn working_directory(self, working_directory: impl Into<PathBuf>) -> Self

Sets the child process working directory, which must resolve inside project_root.

Source

pub fn policy(self, policy: SandboxPolicy) -> Self

Source

pub fn env(self, name: impl Into<OsString>, value: impl Into<OsString>) -> Self

Adds one explicit child environment value.

Source

pub fn envs<I, K, V>(self, environment: I) -> Self
where I: IntoIterator<Item = (K, V)>, K: Into<OsString>, V: Into<OsString>,

Adds explicit child environment values without reading the ambient environment.

Source

pub fn build(self) -> Result<ExecutionRequest, ExecutionError>

Trait Implementations§

Source§

impl Clone for ExecutionRequestBuilder

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionRequestBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.