1 | use std::io; |
---|---|
2 | |
3 | /// An interface for killing a running process. |
4 | pub(crate) trait Kill { |
5 | /// Forcefully kills the process. |
6 | fn kill(&mut self) -> io::Result<()>; |
7 | } |
8 | |
9 | impl<T: Kill> Kill for &mut T { |
10 | fn kill(&mut self) -> io::Result<()> { |
11 | (**self).kill() |
12 | } |
13 | } |
14 |