pub trait StaticKernel {
type Value: Clone;
// Required method
fn execute(
&mut self,
node: &CompiledNode,
inputs: &[Option<&Self::Value>],
outputs: &mut [Self::Value],
) -> Result<(), StaticExecutionError>;
}Expand description
A statically linked firmware kernel. Unlike crate::KernelExecutor, it
writes into a caller-owned output slice and never allocates.
Required Associated Types§
Required Methods§
Sourcefn execute(
&mut self,
node: &CompiledNode,
inputs: &[Option<&Self::Value>],
outputs: &mut [Self::Value],
) -> Result<(), StaticExecutionError>
fn execute( &mut self, node: &CompiledNode, inputs: &[Option<&Self::Value>], outputs: &mut [Self::Value], ) -> Result<(), StaticExecutionError>
Execute one step from immutable input references, writing exactly
outputs.len() values into outputs (already sized to the step’s
physical output arity). Returning Err aborts the plan.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".