pub struct Child {
pub stdin: Option<ChildStdin>,
pub stdout: Option<ChildStdout>,
pub stderr: Option<ChildStderr>,
/* private fields */
}
Expand description
A child process created from a MemFdExecutable
with handles to input and output streams
Fields§
§stdin: Option<ChildStdin>
The input stream to the child process
stdout: Option<ChildStdout>
The output stream from the child process
stderr: Option<ChildStderr>
The error stream from the child process
Implementations§
Source§impl Child
impl Child
pub fn new(handle: Process, stdio: StdioPipes) -> Self
Sourcepub fn wait(&mut self) -> Result<ExitStatus>
pub fn wait(&mut self) -> Result<ExitStatus>
Wait for the child process to exit, returning the exit status code
Sourcepub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
Try and wait for the child process to exit, returning the exit status code if it has
Sourcepub fn wait_with_output(self) -> Result<Output>
pub fn wait_with_output(self) -> Result<Output>
Wait for the child process to exit, returning the exit status code and the output streams
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Child
impl RefUnwindSafe for Child
impl Send for Child
impl Sync for Child
impl Unpin for Child
impl UnwindSafe for Child
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