Struct tasm_lib::io::load_struct_from_input::LoadStructFromInput
source · pub struct LoadStructFromInput {
pub input_source: InputSource,
}
Fields§
§input_source: InputSource
Trait Implementations§
source§impl Clone for LoadStructFromInput
impl Clone for LoadStructFromInput
source§fn clone(&self) -> LoadStructFromInput
fn clone(&self) -> LoadStructFromInput
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 LoadStructFromInput
impl Debug for LoadStructFromInput
source§impl Snippet for LoadStructFromInput
impl Snippet for LoadStructFromInput
Load several list of words from the input source into memory.
The first element of each list is the length of the list
that is loaded into memory. Returns a pointer to the first element
in memory. This function is named load_struct_from_input
because
structs are encoded as a sequence of length-prepended lists of words.
Note that the field_count
input argument may never be set through
user input, rather it should be known statically.
This snippet assumes that the dynamic allocator will allocate all
fields contiguously in memory.
source§fn entrypoint(&self) -> String
fn entrypoint(&self) -> String
The name of a Snippet Read more
fn input_types(&self) -> Vec<DataType>
fn output_types(&self) -> Vec<DataType>
source§fn stack_diff(&self) -> isize
fn stack_diff(&self) -> isize
The stack difference
source§fn function_code(&self, library: &mut SnippetState) -> String
fn function_code(&self, library: &mut SnippetState) -> String
The function
source§fn crash_conditions(&self) -> Vec<String>
fn crash_conditions(&self) -> Vec<String>
Ways in which this snippet can crash at runtime
source§fn gen_input_states(&self) -> Vec<ExecutionState>
fn gen_input_states(&self) -> Vec<ExecutionState>
Examples of valid initial states for running this snippet
fn common_case_input_state(&self) -> ExecutionState
fn worst_case_input_state(&self) -> ExecutionState
fn rust_shadowing( &self, stack: &mut Vec<BFieldElement>, std_in: Vec<BFieldElement>, secret_in: Vec<BFieldElement>, memory: &mut HashMap<BFieldElement, BFieldElement> )
fn function_code_as_instructions( &self, library: &mut SnippetState ) -> Vec<LabelledInstruction>
fn link_for_isolated_run(&self, words_statically_allocated: usize) -> String
fn link_and_run_tasm_for_test( &self, stack: &mut Vec<BFieldElement>, std_in: Vec<BFieldElement>, secret_in: Vec<BFieldElement>, memory: &mut HashMap<BFieldElement, BFieldElement>, words_statically_allocated: usize ) -> VmOutputState
fn link_and_run_tasm_for_bench( &self, stack: &mut Vec<BFieldElement>, std_in: Vec<BFieldElement>, secret_in: Vec<BFieldElement>, memory: &mut HashMap<BFieldElement, BFieldElement>, words_statically_allocated: usize ) -> Result<ExecutionResult>
fn link_and_run_tasm_from_state_for_test( &self, execution_state: &mut ExecutionState ) -> VmOutputState
fn link_and_run_tasm_from_state_for_bench( &self, execution_state: &mut ExecutionState ) -> Result<ExecutionResult>
Auto Trait Implementations§
impl RefUnwindSafe for LoadStructFromInput
impl Send for LoadStructFromInput
impl Sync for LoadStructFromInput
impl Unpin for LoadStructFromInput
impl UnwindSafe for LoadStructFromInput
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