pub struct Child {
pub stderr: Option<ChildStderr>,
pub inner: Child,
}
Fields§
§stderr: Option<ChildStderr>
§inner: Child
Implementations§
Source§impl Child
Wrapper for an async child process.
impl Child
Wrapper for an async child process.
The inner implementation depends on the selected async runtime (features async-std-runtime
or tokio-runtime
).
Sourcepub async fn kill(&mut self) -> Result<()>
pub async fn kill(&mut self) -> Result<()>
Kill the child process synchronously and asynchronously wait for the child to exit
Sourcepub async fn wait(&mut self) -> Result<ExitStatus>
pub async fn wait(&mut self) -> Result<ExitStatus>
Asynchronously wait for the child process to exit
Sourcepub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
If the child process has exited, get its status
Sourcepub fn as_mut_inner(&mut self) -> &mut Child
pub fn as_mut_inner(&mut self) -> &mut Child
Return a mutable reference to the inner process
stderr
may not be available.
Sourcepub fn into_inner(self) -> Child
pub fn into_inner(self) -> Child
Return the inner process
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
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