Skip to main content

BackgroundProcessControl

Trait BackgroundProcessControl 

Source
pub trait BackgroundProcessControl: Send + Sync {
    // Required methods
    fn list(&self) -> Vec<BackgroundProcessSummary>;
    fn read(
        &self,
        id: &BackgroundProcessId,
    ) -> Result<BackgroundProcessOutput, BackgroundProcessLookupError>;
    fn stop(
        &self,
        id: &BackgroundProcessId,
    ) -> Result<BackgroundProcessStop, BackgroundProcessLookupError>;
}
Expand description

Session-owned control surface for retained background processes.

Implementations live with the process backend that holds the child.

Required Methods§

Source

fn list(&self) -> Vec<BackgroundProcessSummary>

Lists retained processes, refreshing exit state first.

Source

fn read( &self, id: &BackgroundProcessId, ) -> Result<BackgroundProcessOutput, BackgroundProcessLookupError>

Returns one process and the output captured since it started.

Source

fn stop( &self, id: &BackgroundProcessId, ) -> Result<BackgroundProcessStop, BackgroundProcessLookupError>

Kills one retained process group.

A process that has already exited or been killed returns that state with changed == false.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§