Skip to main content

PtyChild

Trait PtyChild 

Source
pub trait PtyChild: Send + 'static {
    // Required methods
    fn pid(&self) -> u32;
    fn try_wait(&mut self) -> Result<Option<u32>>;
    fn wait(&mut self) -> Result<u32>;
    fn kill(&mut self) -> Result<()>;
}

Required Methods§

Source

fn pid(&self) -> u32

Source

fn try_wait(&mut self) -> Result<Option<u32>>

Poll without blocking. Ok(None) means still running. Ok(Some(code)) means exited with that exit code. &mut self because portable-pty’s underlying Child::try_wait takes &mut, and we keep the surface uniform across backends.

Source

fn wait(&mut self) -> Result<u32>

Block until the child exits, then return the exit code.

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§