Struct miden_processor::ExecutionOptions
source · pub struct ExecutionOptions { /* private fields */ }Expand description
A set of parameters specifying execution parameters of the VM.
max_cyclesspecifies the maximum number of cycles a program is allowed to execute.expected_cyclesspecifies the number of cycles a program is expected to execute.
Implementations§
source§impl ExecutionOptions
impl ExecutionOptions
sourcepub fn new(
max_cycles: Option<u32>,
expected_cycles: u32,
enable_tracing: bool
) -> Result<ExecutionOptions, ExecutionOptionsError>
pub fn new( max_cycles: Option<u32>, expected_cycles: u32, enable_tracing: bool ) -> Result<ExecutionOptions, ExecutionOptionsError>
Creates a new instance of ExecutionOptions from the specified parameters.
If the max_cycles is None the maximum number of cycles will be set to u32::MAX
sourcepub fn with_tracing(self) -> ExecutionOptions
pub fn with_tracing(self) -> ExecutionOptions
Enables Host to handle the tracing instructions.
sourcepub fn max_cycles(&self) -> u32
pub fn max_cycles(&self) -> u32
Returns maximum number of cycles
sourcepub fn expected_cycles(&self) -> u32
pub fn expected_cycles(&self) -> u32
Returns number of the expected cycles
sourcepub fn enable_tracing(&self) -> bool
pub fn enable_tracing(&self) -> bool
Returns a flag indicating whether the Host should handle trace instructions
Trait Implementations§
source§impl Clone for ExecutionOptions
impl Clone for ExecutionOptions
source§fn clone(&self) -> ExecutionOptions
fn clone(&self) -> ExecutionOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ExecutionOptions
impl Debug for ExecutionOptions
source§impl Default for ExecutionOptions
impl Default for ExecutionOptions
source§fn default() -> ExecutionOptions
fn default() -> ExecutionOptions
Returns the “default value” for a type. Read more
source§impl PartialEq for ExecutionOptions
impl PartialEq for ExecutionOptions
source§fn eq(&self, other: &ExecutionOptions) -> bool
fn eq(&self, other: &ExecutionOptions) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for ExecutionOptions
impl Eq for ExecutionOptions
impl StructuralPartialEq for ExecutionOptions
Auto Trait Implementations§
impl RefUnwindSafe for ExecutionOptions
impl Send for ExecutionOptions
impl Sync for ExecutionOptions
impl Unpin for ExecutionOptions
impl UnwindSafe for ExecutionOptions
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