pub struct Child<T: Object>(/* private fields */);
Expand description
The subprocess object created by calling spawn
on a function annottated with #[func]
.
Implementations§
source§impl<T: Object> Child<T>
impl<T: Object> Child<T>
sourcepub fn get_kill_handle(&self) -> KillHandle
pub fn get_kill_handle(&self) -> KillHandle
Get a handle for process termination.
sourcepub fn join(self) -> Result<T>
pub 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<T> Freeze for Child<T>
impl<T> RefUnwindSafe for Child<T>
impl<T> Send for Child<T>
impl<T> Sync for Child<T>
impl<T> Unpin for Child<T>
impl<T> UnwindSafe for Child<T>
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