pub trait ProgramExecutor {
// Required methods
fn new(
stack_inputs: StackInputs,
advice_inputs: AdviceInputs,
options: ExecutionOptions,
) -> Self
where Self: Sized;
fn execute<H: Host + Send>(
self,
program: &Program,
host: &mut H,
) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>;
// Provided method
fn execute_with_package_debug_info<H: Host + Send>(
self,
program: &Program,
package_debug_info: &PackageDebugInfo,
entrypoint_source_node: Option<DebugSourceNodeId>,
host: &mut H,
) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>
where Self: Sized { ... }
}Expand description
A transaction-scoped program executor used by
TransactionExecutor.
TODO: Move this trait into miden-vm once the executor boundary is
consolidated there.
Required Methods§
Sourcefn new(
stack_inputs: StackInputs,
advice_inputs: AdviceInputs,
options: ExecutionOptions,
) -> Selfwhere
Self: Sized,
fn new(
stack_inputs: StackInputs,
advice_inputs: AdviceInputs,
options: ExecutionOptions,
) -> Selfwhere
Self: Sized,
Create a new executor configured with the provided transaction inputs and options.
Sourcefn execute<H: Host + Send>(
self,
program: &Program,
host: &mut H,
) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>
fn execute<H: Host + Send>( self, program: &Program, host: &mut H, ) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>
Execute the provided program against the given host.
Provided Methods§
Sourcefn execute_with_package_debug_info<H: Host + Send>(
self,
program: &Program,
package_debug_info: &PackageDebugInfo,
entrypoint_source_node: Option<DebugSourceNodeId>,
host: &mut H,
) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>where
Self: Sized,
fn execute_with_package_debug_info<H: Host + Send>(
self,
program: &Program,
package_debug_info: &PackageDebugInfo,
entrypoint_source_node: Option<DebugSourceNodeId>,
host: &mut H,
) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>where
Self: Sized,
Execute the provided program with package-owned source/debug context.
Executors that do not support package debug execution may fall back to plain execution.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".