Skip to main content

ContainmentChild

Trait ContainmentChild 

Source
pub trait ContainmentChild {
    // Required methods
    fn process_id(&self) -> Option<u32>;
    fn try_wait(&mut self) -> Result<bool>;
}
Expand description

Minimal owned-child contract used by ContainmentGuard.

Consumers can wrap an external child type without exposing PTY handles or terminal data to sysprims. The adapter must retain exclusive reap ownership from receipt consumption through guard finalization; process_id must name that unreaped child for the adapter’s lifetime.

Required Methods§

Source

fn process_id(&self) -> Option<u32>

Source

fn try_wait(&mut self) -> Result<bool>

Poll and reap the child when it has exited.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ContainmentChild for Child

Source§

fn process_id(&self) -> Option<u32>

Source§

fn try_wait(&mut self) -> Result<bool>

Implementors§