pub struct ChildRequest<'a> {
pub executable: &'a Path,
pub arguments: &'a [OsString],
pub directory: &'a Path,
pub environment: &'a [(OsString, OsString)],
pub input: &'a [u8],
pub scratch: &'a Path,
pub limits: ChildLimits,
}Expand description
What:
Everything one child needs.
'a names how long the borrowed parts last;
&[(OsString, OsString)] is the complete environment,
as name and value pairs.
Why:
The child gets exactly this environment and nothing inherited by accident.
In TS you’d write (pseudocode):
type ChildRequest = { executable: string; args: string[]; cwd: string; env: [string, string][]; input: Uint8Array; scratch: string; limits: ChildLimits };Fields§
§executable: &'a PathThe program, by path.
arguments: &'a [OsString]Its arguments, after the program name.
directory: &'a PathIts working directory.
environment: &'a [(OsString, OsString)]Its whole environment.
input: &'a [u8]The bytes it reads as standard input.
scratch: &'a PathThe directory the anonymous stream files are made in, normally the system’s temporary directory.
limits: ChildLimitsIts time bound and output caps.
Trait Implementations§
Source§impl<'a> Clone for ChildRequest<'a>
impl<'a> Clone for ChildRequest<'a>
impl<'a> Copy for ChildRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for ChildRequest<'a>
impl<'a> RefUnwindSafe for ChildRequest<'a>
impl<'a> Send for ChildRequest<'a>
impl<'a> Sync for ChildRequest<'a>
impl<'a> Unpin for ChildRequest<'a>
impl<'a> UnsafeUnpin for ChildRequest<'a>
impl<'a> UnwindSafe for ChildRequest<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more