pub struct Child { /* private fields */ }Expand description
A spawned process, possibly relaying stdio across VFS domains.
Implementations§
Source§impl Child
impl Child
Sourcepub fn relay_error(&mut self) -> Option<Error>
pub fn relay_error(&mut self) -> Option<Error>
Takes the first error a stream relay met, once wait
has finished the relays.
The process status is reported apart from this, so a caller can decide which matters more.
Sourcepub async fn wait(&mut self) -> Result<ProcessStatus>
pub async fn wait(&mut self) -> Result<ProcessStatus>
Waits for the process to exit.
Sourcepub async fn terminate(self) -> Result<Option<ProcessStatus>>
pub async fn terminate(self) -> Result<Option<ProcessStatus>>
Terminates the process and returns its status when it has exited.
Auto Trait Implementations§
impl !RefUnwindSafe for Child
impl !UnwindSafe for Child
impl Freeze for Child
impl Send for Child
impl Sync for Child
impl Unpin for Child
impl UnsafeUnpin 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> 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