#[non_exhaustive]pub enum RotationEngine {
Portable(Box<PortableRotation>),
Jit(Box<CompiledRotation>),
}Expand description
Production rotation executable with structural evaluation limited to attached decision traces.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Portable(Box<PortableRotation>)
Jit(Box<CompiledRotation>)
Implementations§
Source§impl RotationEngine
impl RotationEngine
Sourcepub fn portable(prepared: PreparedRotation) -> Self
pub fn portable(prepared: PreparedRotation) -> Self
Construct the ordinary portable executable from one prepared artifact.
Sourcepub fn compile(rotation: &Rotation, resolver: &SpecResolver) -> Result<Self>
pub fn compile(rotation: &Rotation, resolver: &SpecResolver) -> Result<Self>
Prepare and compile a canonical rotation to portable bytecode.
§Errors
Returns an error when validation, resolution, or schema preparation fails.
Sourcepub fn compile_json(json: &str, resolver: &SpecResolver) -> Result<Self>
pub fn compile_json(json: &str, resolver: &SpecResolver) -> Result<Self>
Parse JSON and compile to portable bytecode.
§Errors
Returns an error when parsing, validation, resolution, or schema preparation fails.
Sourcepub fn compile_empty(resolver: &SpecResolver) -> Result<Self>
pub fn compile_empty(resolver: &SpecResolver) -> Result<Self>
Sourcepub fn compile_jit(json: &str, resolver: &SpecResolver) -> Result<Self>
pub fn compile_jit(json: &str, resolver: &SpecResolver) -> Result<Self>
Parse, prepare, and explicitly compile the native JIT executable.
§Errors
Returns an error when parsing, preparation, lowering, or native compilation fails.
Sourcepub fn jit(prepared: PreparedRotation) -> Result<Self>
pub fn jit(prepared: PreparedRotation) -> Result<Self>
Explicitly compile the native JIT executable from one prepared artifact.
§Errors
Returns an error when native lowering or compilation fails.
Sourcepub fn with_decision_trace(self, sink: DecisionTraceTarget) -> Self
pub fn with_decision_trace(self, sink: DecisionTraceTarget) -> Self
Attach explicit decision tracing. This does not replace the selected production backend.
Sourcepub fn has_decision_trace(&self) -> bool
pub fn has_decision_trace(&self) -> bool
True when explicit decision tracing is attached.
Sourcepub fn set_decision_trace(&mut self, sink: DecisionTraceTarget)
pub fn set_decision_trace(&mut self, sink: DecisionTraceTarget)
Attach the explicit diagnostic trace target in place.
Sourcepub fn prepared(&self) -> &PreparedRotation
pub fn prepared(&self) -> &PreparedRotation
Prepared schema and complete reference metadata shared by both production compilers.
Sourcepub fn evaluate(
&mut self,
buffer: &mut DenseBuffer,
now_secs: f64,
) -> EvalResult
pub fn evaluate( &mut self, buffer: &mut DenseBuffer, now_secs: f64, ) -> EvalResult
Evaluate the selected compiled backend against one matching dense buffer.
Sourcepub fn schema(&self) -> &ContextSchema
pub fn schema(&self) -> &ContextSchema
Return the immutable schema prepared for the selected executable.
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