Skip to main content

KernelExecutor

Trait KernelExecutor 

Source
pub trait KernelExecutor {
    type Value;

    // Required method
    fn execute(
        &mut self,
        node: &CompiledNode,
        inputs: &[Option<&Self::Value>],
    ) -> Result<Vec<Self::Value>, ExecutionError>;

    // Provided method
    fn execute_with_gaps(
        &mut self,
        node: &CompiledNode,
        inputs: &[Option<&Self::Value>],
    ) -> Result<KernelExecution<Self::Value>, ExecutionError> { ... }
}

Required Associated Types§

Required Methods§

Source

fn execute( &mut self, node: &CompiledNode, inputs: &[Option<&Self::Value>], ) -> Result<Vec<Self::Value>, ExecutionError>

Execute one attempt from immutable inputs and return one value per physical output buffer. When a node has no connected output buffer, returned values are terminal invocation outputs.

Provided Methods§

Source

fn execute_with_gaps( &mut self, node: &CompiledNode, inputs: &[Option<&Self::Value>], ) -> Result<KernelExecution<Self::Value>, ExecutionError>

Gap-aware execution hook. Existing atomic kernels implement only execute; explicitly partial kernels override this method and return structured gaps alongside their ordinary output records.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§