mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-26 00:00:16 +02:00
14 lines
287 B
Rust
14 lines
287 B
Rust
use std::io;
|
|
|
|
/// An interface for killing a running process.
|
|
pub(crate) trait Kill {
|
|
/// Forcefully kill the process.
|
|
fn kill(&mut self) -> io::Result<()>;
|
|
}
|
|
|
|
impl<'a, T: 'a + Kill> Kill for &'a mut T {
|
|
fn kill(&mut self) -> io::Result<()> {
|
|
(**self).kill()
|
|
}
|
|
}
|