Trait Control

Source
pub trait Control: Sized {
    // Required methods
    fn command(&self) -> &Command;
    fn id(&self) -> u32;
    fn kill(&mut self) -> Result<()>;
}
Expand description

Process control trait, access Program ID, the command line or kill the running process

Required Methods§

Source

fn command(&self) -> &Command

access the underlying command settings

Source

fn id(&self) -> u32

retrieve the Process ID of the given running program.

Source

fn kill(&mut self) -> Result<()>

force the process to finish

this is equivalent to SIGKILL on unix platform

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Control for Process

Source§

impl<'a, C, D, R, Item> Control for Capture<'a, C, D, R, Item>
where C: Control, R: AsyncRead,

Source§

impl<'a, C, E, Item> Control for SendStdin<'a, C, E, Item>
where C: Control,