pub struct ChildProcess { /* private fields */ }Implementations§
Source§impl ChildProcess
impl ChildProcess
pub fn spawn(command: &mut Command) -> Result<Self>
pub fn take_stdin(&mut self) -> Option<ChildStdin>
pub fn take_stdout(&mut self) -> Option<ChildStdout>
pub fn take_stderr(&mut self) -> Option<ChildStderr>
pub fn wait_until( &mut self, deadline: Instant, should_cancel: impl FnMut() -> bool, ) -> Result<WaitOutcome, ChildProcessError>
Sourcepub fn terminate_in_place(&mut self) -> Result<(), ChildProcessError>
pub fn terminate_in_place(&mut self) -> Result<(), ChildProcessError>
Stops the group while keeping ownership, so a caller blocked on the child’s output can unblock and still tidy up afterwards.
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>, ChildProcessError>
Sourcepub fn request_termination(&self) -> Result<(), ChildProcessError>
pub fn request_termination(&self) -> Result<(), ChildProcessError>
Asks the group to stop with SIGTERM, so a child with a signal handler can tidy up. Reaping stays with a later wait or terminate; a group already gone counts as asked.
Trait Implementations§
Source§impl Drop for ChildProcess
impl Drop for ChildProcess
Auto Trait Implementations§
impl Freeze for ChildProcess
impl RefUnwindSafe for ChildProcess
impl Send for ChildProcess
impl Sync for ChildProcess
impl Unpin for ChildProcess
impl UnsafeUnpin for ChildProcess
impl UnwindSafe for ChildProcess
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