pub struct Child { /* private fields */ }Expand description
A running child process.
Created by Spawn::run.
Implementations§
Source§impl Child
impl Child
Sourcepub fn stdin(&mut self) -> Option<&mut ChildStdin>
pub fn stdin(&mut self) -> Option<&mut ChildStdin>
Returns a mutable reference to the child’s stdin handle.
Sourcepub fn stdout(&mut self) -> Option<&mut ChildStdout>
pub fn stdout(&mut self) -> Option<&mut ChildStdout>
Returns a mutable reference to the child’s stdout handle.
Sourcepub fn stderr(&mut self) -> Option<&mut ChildStderr>
pub fn stderr(&mut self) -> Option<&mut ChildStderr>
Returns a mutable reference to the child’s stderr handle.
Sourcepub fn take_stdin(&mut self) -> Option<ChildStdin>
pub fn take_stdin(&mut self) -> Option<ChildStdin>
Takes ownership of the child’s stdin handle.
Sourcepub fn take_stdout(&mut self) -> Option<ChildStdout>
pub fn take_stdout(&mut self) -> Option<ChildStdout>
Takes ownership of the child’s stdout handle.
Sourcepub fn take_stderr(&mut self) -> Option<ChildStderr>
pub fn take_stderr(&mut self) -> Option<ChildStderr>
Takes ownership of the child’s stderr handle.
Sourcepub fn wait(self) -> Result<ExitStatus, CommandError>
pub fn wait(self) -> Result<ExitStatus, CommandError>
Waits for the child to exit and returns its exit status.
Sourcepub fn wait_with_output(self) -> Result<Output, CommandError>
pub fn wait_with_output(self) -> Result<Output, CommandError>
Simultaneously waits for the child to exit and collects all output.
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