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§
fn pid(&self) -> u32
Sourcefn try_wait(&mut self) -> Result<Option<u32>>
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.
fn kill(&mut self) -> Result<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".