Skip to main content

RunHandle

Trait RunHandle 

Source
pub trait RunHandle: Send {
    // Required methods
    fn try_wait(&mut self) -> Result<Option<ExitStatus>>;
    fn wait(&mut self) -> Result<ExitStatus>;
    fn kill(&mut self) -> Result<()>;
}
Expand description

A running job — the local impl wraps Child; remote runners (SSH, hosted agents) impl this over their own handle so the worker’s wait/cancel logic stays unchanged.

Required Methods§

Source

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

Non-blocking completion check — None if still running.

Source

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

Block until the run finishes; exit status drives the status sink (“success” vs “error”).

Source

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

Best-effort kill (superseded runs).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl RunHandle for Child

Source§

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

Source§

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

Source§

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

Implementors§