pub struct NativeEngine { /* private fields */ }Expand description
A reusable native-substrate runtime boundary.
The engine owns the native execution boundary and cumulative telemetry. Persistent source/artifact caching is configured by the Runtime owner so namespace, provider, protocol, and mutable Var state remain isolated.
Implementations§
Source§impl NativeEngine
impl NativeEngine
pub fn new() -> Self
Sourcepub fn reset(&self)
pub fn reset(&self)
Resets all cumulative counters. The operation is idempotent and does not affect any Runtime namespace or any already-created VM closure.
pub fn telemetry(&self) -> NativeExecutionTelemetry
Sourcepub fn execute(
&self,
program: Rc<Program>,
) -> Result<NativeExecutionReport, String>
pub fn execute( &self, program: Rc<Program>, ) -> Result<NativeExecutionReport, String>
Executes a validated Hara program through the VM’s synchronous fiber boundary. No tree-evaluator fallback is available from this path.
Sourcepub fn execute_blocking(
&self,
program: Rc<Program>,
) -> Result<NativeExecutionReport, String>
pub fn execute_blocking( &self, program: Rc<Program>, ) -> Result<NativeExecutionReport, String>
Executes a validated Hara program and drives settled VM promises to the
same blocking boundary used by Runtime::eval_native.
Trait Implementations§
Source§impl Clone for NativeEngine
impl Clone for NativeEngine
Source§fn clone(&self) -> NativeEngine
fn clone(&self) -> NativeEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for NativeEngine
impl Default for NativeEngine
Source§fn default() -> NativeEngine
fn default() -> NativeEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for NativeEngine
impl !Send for NativeEngine
impl !Sync for NativeEngine
impl !UnwindSafe for NativeEngine
impl Freeze for NativeEngine
impl Unpin for NativeEngine
impl UnsafeUnpin for NativeEngine
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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