pub struct SubprocessRunner { /* private fields */ }Expand description
Runner that executes TaskKind::Subprocess as OS subprocesses.
§Also
SubprocessBackendConfigrlimits, cgroups, security applied to spawned processes.SubprocessTaskConfigresolved per-task config.register_subprocess_runnerregistration helper.solti_runner::Runnertrait this type implements.
Implementations§
Source§impl SubprocessRunner
impl SubprocessRunner
Sourcepub fn new(name: &'static str) -> Self
pub fn new(name: &'static str) -> Self
Create a new subprocess runner without backend configuration.
Sourcepub fn with_config(
name: &'static str,
config: SubprocessBackendConfig,
) -> Result<Self, ExecError>
pub fn with_config( name: &'static str, config: SubprocessBackendConfig, ) -> Result<Self, ExecError>
Create a subprocess runner with explicit backend configuration.
§Errors
Returns ExecError if the configuration is invalid.
Trait Implementations§
Source§impl Runner for SubprocessRunner
impl Runner for SubprocessRunner
Source§fn supports(&self, spec: &TaskSpec) -> bool
fn supports(&self, spec: &TaskSpec) -> bool
Returns
true if this runner can handle the given spec.Source§fn build_task(
&self,
spec: &TaskSpec,
ctx: &BuildContext,
) -> Result<TaskRef, RunnerError>
fn build_task( &self, spec: &TaskSpec, ctx: &BuildContext, ) -> Result<TaskRef, RunnerError>
Auto Trait Implementations§
impl Freeze for SubprocessRunner
impl RefUnwindSafe for SubprocessRunner
impl Send for SubprocessRunner
impl Sync for SubprocessRunner
impl Unpin for SubprocessRunner
impl UnsafeUnpin for SubprocessRunner
impl UnwindSafe for SubprocessRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more