pub trait ClosedLoopKernel {
type Error;
// Required methods
fn switches(&self) -> LayerSwitches;
fn step_internal(&mut self) -> Result<ControlDirective, Self::Error>;
fn step_external(
&mut self,
telemetry: StepTelemetry,
) -> Result<ControlDirective, Self::Error>;
}Available on crate feature
std only.Expand description
Interface for a kernel that accepts internal steps or external telemetry.
Required Associated Types§
Required Methods§
Sourcefn switches(&self) -> LayerSwitches
fn switches(&self) -> LayerSwitches
Returns the layer switches currently used by the kernel.
Sourcefn step_internal(&mut self) -> Result<ControlDirective, Self::Error>
fn step_internal(&mut self) -> Result<ControlDirective, Self::Error>
Runs one step using the kernel’s internal world adapters.
Sourcefn step_external(
&mut self,
telemetry: StepTelemetry,
) -> Result<ControlDirective, Self::Error>
fn step_external( &mut self, telemetry: StepTelemetry, ) -> Result<ControlDirective, Self::Error>
Processes one externally measured step and returns the resulting control directive.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".