Skip to main content

ProcessManager

Trait ProcessManager 

Source
pub trait ProcessManager: Clone {
    type Handle: BackgroundHandle;

    // Required method
    fn run_command(
        &mut self,
        ctx: &CommandContext,
        script: &str,
        options: CommandOptions,
    ) -> Result<CommandResult<Self::Handle>>;
}
Expand description

Abstraction for running shell commands both in the foreground and background. oxdock-core relies on this trait to decouple the executor from std::process::Command, which in turn enables Miri-friendly test doubles.

Required Associated Types§

Required Methods§

Source

fn run_command( &mut self, ctx: &CommandContext, script: &str, options: CommandOptions, ) -> Result<CommandResult<Self::Handle>>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§