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§
Sourcefn list(&self) -> Vec<BackgroundProcessSummary>
fn list(&self) -> Vec<BackgroundProcessSummary>
Lists retained processes, refreshing exit state first.
Sourcefn read(
&self,
id: &BackgroundProcessId,
) -> Result<BackgroundProcessOutput, BackgroundProcessLookupError>
fn read( &self, id: &BackgroundProcessId, ) -> Result<BackgroundProcessOutput, BackgroundProcessLookupError>
Returns one process and the output captured since it started.
Sourcefn stop(
&self,
id: &BackgroundProcessId,
) -> Result<BackgroundProcessStop, BackgroundProcessLookupError>
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".