pub trait Interruptible {
// Required method
fn pid(&mut self) -> Result<Option<u32>>;
// Provided methods
fn interrupt(&mut self) -> Result<()> { ... }
fn terminate(&mut self) -> Result<()> { ... }
}Expand description
A trait for sending interrupts/ctrl-c to child processes.
NOTE: By implementing this trait, you are stating that the correct steps have been taken to ensure that the child process can actually be interrupted.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Interruptible for send_ctrlc::InterruptibleChild
impl Interruptible for send_ctrlc::tokio::InterruptibleChild
Available on crate feature
tokio only.