pub trait Process {
// Required methods
fn wait(&mut self) -> impl Future<Output = Result<Termination>> + Send;
fn signal(&mut self, signal: Signal) -> Result<()>;
fn group_alive(&self) -> bool;
// Provided method
fn ended(&self) -> Ended { ... }
}Expand description
A running task process.
Required Methods§
Sourcefn wait(&mut self) -> impl Future<Output = Result<Termination>> + Send
fn wait(&mut self) -> impl Future<Output = Result<Termination>> + Send
Waits until the process ends.
Sourcefn signal(&mut self, signal: Signal) -> Result<()>
fn signal(&mut self, signal: Signal) -> Result<()>
Sends a signal to the process’s whole group; a group that is already gone is fine.
§Errors
Returns the operating system’s error for anything but a group that is gone.
Sourcefn group_alive(&self) -> bool
fn group_alive(&self) -> bool
Whether anything of its group still runs, after its leader ended (no default: a wrapper that forgot to forward it would leave a stopped task’s children behind).
Provided Methods§
Sourcefn ended(&self) -> Ended
fn ended(&self) -> Ended
What it used and whether it dumped core, once Process::wait returned; nothing
known by default.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".