Skip to main content

ExecutionAdapter

Trait ExecutionAdapter 

Source
pub trait ExecutionAdapter: Debug + 'static {
    // Required methods
    fn execution_class(&self) -> ExecutionClassId;
    fn prepare(
        &self,
        plan: &ResolvedAppPlan,
    ) -> Result<PreparedNativeApp, RuntimeFailure>;

    // Provided method
    fn recreate(
        &self,
        _plan: &ResolvedAppPlan,
        instance_key: &str,
    ) -> Result<PreparedNativeModule, RuntimeFailure> { ... }
}
Expand description

Host-specific seam that instantiates Module generations and prepares endpoints.

Required Methods§

Source

fn execution_class(&self) -> ExecutionClassId

Returns the open execution class implemented by this Adapter package.

Source

fn prepare( &self, plan: &ResolvedAppPlan, ) -> Result<PreparedNativeApp, RuntimeFailure>

Instantiates the exact Plan and confirms its endpoint and binding tables.

Provided Methods§

Source

fn recreate( &self, _plan: &ResolvedAppPlan, instance_key: &str, ) -> Result<PreparedNativeModule, RuntimeFailure>

Creates a fresh generation for one selected Module Instance.

Adapters that cannot truthfully recreate a generation retain the default failure, which lets Kernel apply the selected finite policy without pretending that an in-process fault boundary is recoverable.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§