Struct miden_processor::StackInputs
source · pub struct StackInputs { /* private fields */ }
Expand description
Initial state of the stack to support program execution.
The program execution expects the inputs to be a stack on the VM, and it will be stored in reversed order on this struct.
Implementations§
source§impl StackInputs
impl StackInputs
sourcepub fn new(values: Vec<BaseElement, Global>) -> StackInputs
pub fn new(values: Vec<BaseElement, Global>) -> StackInputs
Returns [StackInputs]
from a list of values, reversing them into a stack.
sourcepub fn try_from_values<I>(iter: I) -> Result<StackInputs, InputError>where
I: IntoIterator<Item = u64>,
pub fn try_from_values<I>(iter: I) -> Result<StackInputs, InputError>where I: IntoIterator<Item = u64>,
Attempts to create stack inputs from an iterator of numbers, failing if they do not represent a valid field element.
sourcepub fn values(&self) -> &[BaseElement]
pub fn values(&self) -> &[BaseElement]
Returns the initial stack values in stack/reversed order.
Trait Implementations§
source§impl Clone for StackInputs
impl Clone for StackInputs
source§fn clone(&self) -> StackInputs
fn clone(&self) -> StackInputs
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 StackInputs
impl Debug for StackInputs
source§impl Default for StackInputs
impl Default for StackInputs
source§fn default() -> StackInputs
fn default() -> StackInputs
Returns the “default value” for a type. Read more
source§impl<'a> IntoIterator for &'a StackInputs
impl<'a> IntoIterator for &'a StackInputs
§type Item = &'a BaseElement
type Item = &'a BaseElement
The type of the elements being iterated over.
§type IntoIter = Iter<'a, BaseElement>
type IntoIter = Iter<'a, BaseElement>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <&'a StackInputs as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a StackInputs as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
source§impl IntoIterator for StackInputs
impl IntoIterator for StackInputs
§type Item = BaseElement
type Item = BaseElement
The type of the elements being iterated over.
§type IntoIter = IntoIter<BaseElement, Global>
type IntoIter = IntoIter<BaseElement, Global>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <StackInputs as IntoIterator>::IntoIter
fn into_iter(self) -> <StackInputs as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
source§impl Serializable for StackInputs
impl Serializable for StackInputs
source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where W: ByteWriter,
Serializes
self
into bytes and writes these bytes into the target
.§fn write_batch_into<W>(source: &[Self], target: &mut W)where
W: ByteWriter,
fn write_batch_into<W>(source: &[Self], target: &mut W)where W: ByteWriter,
§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
source§impl ToElements<BaseElement> for StackInputs
impl ToElements<BaseElement> for StackInputs
fn to_elements(&self) -> Vec<BaseElement, Global>
Auto Trait Implementations§
impl RefUnwindSafe for StackInputs
impl Send for StackInputs
impl Sync for StackInputs
impl Unpin for StackInputs
impl UnwindSafe for StackInputs
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