#[non_exhaustive]pub struct ChildProcessSpec { /* private fields */ }Expand description
Command specification for a supervised child process.
Implementations§
Source§impl ChildProcessSpec
impl ChildProcessSpec
Sourcepub fn env(self, key: impl Into<OsString>, value: impl Into<OsString>) -> Self
pub fn env(self, key: impl Into<OsString>, value: impl Into<OsString>) -> Self
Add one environment variable override.
Sourcepub fn current_dir(self, current_dir: impl Into<PathBuf>) -> Self
pub fn current_dir(self, current_dir: impl Into<PathBuf>) -> Self
Set the child process working directory.
Sourcepub fn stdin_piped(self) -> Self
pub fn stdin_piped(self) -> Self
Pipe child stdin so the supervisor can write to it after spawn.
Sourcepub fn stdout_piped(self) -> Self
pub fn stdout_piped(self) -> Self
Pipe child stdout so the supervisor can read readiness output.
Sourcepub fn stderr_piped(self) -> Self
pub fn stderr_piped(self) -> Self
Pipe child stderr so the supervisor can forward log output.
Sourcepub fn kill_on_drop(self, kill_on_drop: bool) -> Self
pub fn kill_on_drop(self, kill_on_drop: bool) -> Self
Configure whether Tokio force-kills the direct child when its handle is dropped.
Sourcepub fn process_group(self, process_group: i32) -> Self
pub fn process_group(self, process_group: i32) -> Self
Run the child in the requested Unix process group.
Sourcepub fn program_args(&self) -> &[OsString]
pub fn program_args(&self) -> &[OsString]
Command-line arguments.
Trait Implementations§
Source§impl Clone for ChildProcessSpec
impl Clone for ChildProcessSpec
Source§impl Debug for ChildProcessSpec
impl Debug for ChildProcessSpec
impl Eq for ChildProcessSpec
Source§impl PartialEq for ChildProcessSpec
impl PartialEq for ChildProcessSpec
impl StructuralPartialEq for ChildProcessSpec
Auto Trait Implementations§
impl Freeze for ChildProcessSpec
impl RefUnwindSafe for ChildProcessSpec
impl Send for ChildProcessSpec
impl Sync for ChildProcessSpec
impl Unpin for ChildProcessSpec
impl UnsafeUnpin for ChildProcessSpec
impl UnwindSafe for ChildProcessSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.