Struct miden_core::stack::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<Felt>) -> Self
pub fn new(values: Vec<Felt>) -> Self
Returns [StackInputs]
from a list of values, reversing them into a stack.
sourcepub fn try_from_values<I>(iter: I) -> Result<Self, InputError>where
I: IntoIterator<Item = u64>,
pub fn try_from_values<I>(iter: I) -> Result<Self, 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.
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
source§impl IntoIterator for StackInputs
impl IntoIterator for StackInputs
source§impl Serializable for StackInputs
impl Serializable for StackInputs
source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self
into bytes and writes these bytes into the target
.source§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,
source§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<Felt>
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