pub struct ProcessState<'a> { /* private fields */ }Implementations§
Source§impl ProcessState<'_>
impl ProcessState<'_>
Sourcepub fn get_stack_item(&self, pos: usize) -> Felt
pub fn get_stack_item(&self, pos: usize) -> Felt
Returns the value located at the specified position on the stack at the current clock cycle.
Sourcepub fn get_stack_word(&self, word_idx: usize) -> Word
pub fn get_stack_word(&self, word_idx: usize) -> Word
Returns a word located at the specified word index on the stack.
Specifically, word 0 is defined by the first 4 elements of the stack, word 1 is defined by the next 4 elements etc. Since the top of the stack contains 4 word, the highest valid word index is 3.
The words are created in reverse order. For example, for word 0 the top element of the stack will be at the last position in the word.
Creating a word does not change the state of the stack.
Sourcepub fn get_stack_state(&self) -> Vec<Felt>
pub fn get_stack_state(&self) -> Vec<Felt>
Returns stack state at the current clock cycle. This includes the top 16 items of the stack + overflow entries.
Sourcepub fn get_mem_value(&self, ctx: ContextId, addr: u32) -> Option<Felt>
pub fn get_mem_value(&self, ctx: ContextId, addr: u32) -> Option<Felt>
Returns the element located at the specified context/address, or None if the address hasn’t been accessed previously.
Sourcepub fn get_mem_word(
&self,
ctx: ContextId,
addr: u32,
) -> Result<Option<Word>, ExecutionError>
pub fn get_mem_word( &self, ctx: ContextId, addr: u32, ) -> Result<Option<Word>, ExecutionError>
Returns the batch of elements starting at the specified context/address.
§Errors
- If the address is not word aligned.
Trait Implementations§
Source§impl<'a> Clone for ProcessState<'a>
impl<'a> Clone for ProcessState<'a>
Source§fn clone(&self) -> ProcessState<'a>
fn clone(&self) -> ProcessState<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more