pub struct Child<Stream: AsyncStream, T: Object> { /* private fields */ }Expand description
A subprocess.
Implementations§
Source§impl<Stream: AsyncStream, T: Object> Child<Stream, T>
impl<Stream: AsyncStream, T: Object> Child<Stream, T>
Sourcepub fn get_kill_handle(&self) -> KillHandle
pub fn get_kill_handle(&self) -> KillHandle
Get a handle for process termination.
Sourcepub async fn join(self) -> Result<T>
pub async fn join(self) -> Result<T>
Wait for the process to finish and obtain the value it returns.
An error is returned if the process panics or is terminated. An error is also delivered if
it exits via std::process::exit or alike instead of returning a value, unless the return
type is (). In that case, Ok(()) is returned.
Trait Implementations§
Auto Trait Implementations§
impl<Stream, T> Freeze for Child<Stream, T>where
Stream: Freeze,
impl<Stream, T> RefUnwindSafe for Child<Stream, T>where
Stream: RefUnwindSafe,
impl<Stream, T> Send for Child<Stream, T>where
Stream: Send,
impl<Stream, T> Sync for Child<Stream, T>where
Stream: Sync,
impl<Stream, T> Unpin for Child<Stream, T>where
Stream: Unpin,
impl<Stream, T> UnwindSafe for Child<Stream, T>where
Stream: UnwindSafe,
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