Skip to main content

ExecutionProvider

Trait ExecutionProvider 

Source
pub trait ExecutionProvider:
    Debug
    + Send
    + Sync {
Show 18 methods // Required methods fn spawn( &self, attempt: &RunnerAttempt, config: &EncodedJitConfig, ) -> Result<u32, ProcessStartFailure>; fn is_alive(&self, attempt: &RunnerAttempt) -> Result<bool, FailureReason>; fn recovered_pid( &self, attempt: &RunnerAttempt, ) -> Result<Option<u32>, FailureReason>; fn completed_successfully(&self, attempt: &RunnerAttempt) -> bool; fn record_terminate_intent( &self, attempt: &RunnerAttempt, ) -> Result<(), FailureReason>; fn has_terminate_intent(&self, attempt: &RunnerAttempt) -> bool; fn terminate(&self, attempt: &RunnerAttempt) -> Result<(), FailureReason>; // Provided methods fn probe(&self, policy: &ScalePolicy) -> ProviderCapability { ... } fn resolve( &self, policy: &ScalePolicy, ) -> Result<Option<ResolvedEnvironment>, FailureReason> { ... } fn prepare( &self, attempt: &RunnerAttempt, policy: &ScalePolicy, ) -> Result<PreparedEnvironment, FailureReason> { ... } fn start( &self, prepared: PreparedEnvironment, attempt: &RunnerAttempt, handoff: OneTimeJitHandoff<'_>, ) -> Result<EnvironmentIdentity, ProcessStartFailure> { ... } fn inspect( &self, attempt: &RunnerAttempt, ) -> Result<EnvironmentState, FailureReason> { ... } fn stop( &self, attempt: &RunnerAttempt, ) -> Result<ProviderStop, FailureReason> { ... } fn destroy( &self, attempt: &RunnerAttempt, ) -> Result<ProviderDestroy, FailureReason> { ... } fn recover( &self, attempt: &RunnerAttempt, ) -> Result<EnvironmentState, FailureReason> { ... } fn enumerate_owned(&self, _host_id: HostId) -> Vec<EnvironmentIdentity> { ... } fn diagnostics(&self, _attempt: &RunnerAttempt) -> Vec<ProviderDiagnostic> { ... } fn owns(&self, attempt: &RunnerAttempt) -> Result<bool, FailureReason> { ... }
}
Expand description

Provider lifecycle and native process supervision. The default lifecycle methods adapt the existing native spawn/recovery implementation, and refuse every isolated allocation. Future platform adapters must implement their own prepare/start/inspect/stop/destroy paths rather than fall back here.

Required Methods§

Source

fn spawn( &self, attempt: &RunnerAttempt, config: &EncodedJitConfig, ) -> Result<u32, ProcessStartFailure>

Source

fn is_alive(&self, attempt: &RunnerAttempt) -> Result<bool, FailureReason>

Source

fn recovered_pid( &self, attempt: &RunnerAttempt, ) -> Result<Option<u32>, FailureReason>

Durable identity observed for a process that spawned before the starting journal write survived.

Source

fn completed_successfully(&self, attempt: &RunnerAttempt) -> bool

True only for a child this invocation owned and reaped with a successful exit status. A recovered process that is merely gone answers false.

Source

fn record_terminate_intent( &self, attempt: &RunnerAttempt, ) -> Result<(), FailureReason>

Source

fn has_terminate_intent(&self, attempt: &RunnerAttempt) -> bool

Source

fn terminate(&self, attempt: &RunnerAttempt) -> Result<(), FailureReason>

Provided Methods§

Source

fn probe(&self, policy: &ScalePolicy) -> ProviderCapability

Source

fn resolve( &self, policy: &ScalePolicy, ) -> Result<Option<ResolvedEnvironment>, FailureReason>

Resolve Auto and image identity before allocation or GitHub JIT. Native has no image.

Source

fn prepare( &self, attempt: &RunnerAttempt, policy: &ScalePolicy, ) -> Result<PreparedEnvironment, FailureReason>

Source

fn start( &self, prepared: PreparedEnvironment, attempt: &RunnerAttempt, handoff: OneTimeJitHandoff<'_>, ) -> Result<EnvironmentIdentity, ProcessStartFailure>

Source

fn inspect( &self, attempt: &RunnerAttempt, ) -> Result<EnvironmentState, FailureReason>

Source

fn stop(&self, attempt: &RunnerAttempt) -> Result<ProviderStop, FailureReason>

Source

fn destroy( &self, attempt: &RunnerAttempt, ) -> Result<ProviderDestroy, FailureReason>

Source

fn recover( &self, attempt: &RunnerAttempt, ) -> Result<EnvironmentState, FailureReason>

Source

fn enumerate_owned(&self, _host_id: HostId) -> Vec<EnvironmentIdentity>

Source

fn diagnostics(&self, _attempt: &RunnerAttempt) -> Vec<ProviderDiagnostic>

Source

fn owns(&self, attempt: &RunnerAttempt) -> Result<bool, FailureReason>

Independent resource metadata must match the journal before destructive calls.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§