#[non_exhaustive]pub enum RotationEngine {
Jit(Box<CompiledRotation>),
Interpreted(Box<InterpretedRotation>),
}Expand description
Dispatches rotation evaluation to JIT or interpreter backend.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Jit(Box<CompiledRotation>)
Interpreted(Box<InterpretedRotation>)
Implementations§
Source§impl RotationEngine
impl RotationEngine
Sourcepub fn compile(rotation: &Rotation, resolver: &SpecResolver) -> Result<Self>
pub fn compile(rotation: &Rotation, resolver: &SpecResolver) -> Result<Self>
Compile a canonical rotation AST using the configured backend.
§Errors
Returns an error when validation, lowering, or native compilation fails.
Sourcepub fn compile_json(json: &str, resolver: &SpecResolver) -> Result<Self>
pub fn compile_json(json: &str, resolver: &SpecResolver) -> Result<Self>
Uses JIT when the jit feature is enabled, interpreter otherwise.
§Errors
Returns an error when parsing, validation, lowering, or compilation fails.
Sourcepub fn compile_empty(resolver: &SpecResolver) -> Result<Self>
pub fn compile_empty(resolver: &SpecResolver) -> Result<Self>
Compile an empty, no-op rotation.
§Errors
Returns an error when the empty rotation cannot be lowered or compiled.
Sourcepub fn compile_jit(json: &str, resolver: &SpecResolver) -> Result<Self>
pub fn compile_jit(json: &str, resolver: &SpecResolver) -> Result<Self>
Force the JIT backend.
§Errors
Returns an error when parsing, lowering, or native compilation fails.
Sourcepub fn compile_interpreted(json: &str, resolver: &SpecResolver) -> Result<Self>
pub fn compile_interpreted(json: &str, resolver: &SpecResolver) -> Result<Self>
Force the interpreter backend.
§Errors
Returns an error when parsing, validation, or lowering fails.
Sourcepub fn with_decision_trace(self, sink: DecisionTraceTarget) -> Self
pub fn with_decision_trace(self, sink: DecisionTraceTarget) -> Self
Attach a DecisionTraceTarget. JIT engines are recompiled through the interpreter.
Sourcepub fn has_decision_trace(&self) -> bool
pub fn has_decision_trace(&self) -> bool
True when a sink is attached.
Sourcepub fn set_decision_trace(&mut self, sink: DecisionTraceTarget)
pub fn set_decision_trace(&mut self, sink: DecisionTraceTarget)
Attach a sink in place.
fn compile_ast(rotation: &Rotation, resolver: &SpecResolver) -> Result<Self>
Trait Implementations§
Source§impl Debug for RotationEngine
impl Debug for RotationEngine
Source§impl RuntimeBackend for RotationEngine
impl RuntimeBackend for RotationEngine
fn evaluate(&mut self, buffer: &mut DenseBuffer, now_secs: f64) -> EvalResult
fn schema(&self) -> &ContextSchema
Auto Trait Implementations§
impl Freeze for RotationEngine
impl !RefUnwindSafe for RotationEngine
impl Send for RotationEngine
impl !Sync for RotationEngine
impl Unpin for RotationEngine
impl UnsafeUnpin for RotationEngine
impl !UnwindSafe for RotationEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more