pub trait Closure: BasicSnippet {
// Required methods
fn rust_shadow(&self, stack: &mut Vec<BFieldElement>);
fn pseudorandom_initial_state(
&self,
seed: [u8; 32],
bench_case: Option<BenchmarkCase>,
) -> Vec<BFieldElement>;
// Provided method
fn corner_case_initial_states(&self) -> Vec<Vec<BFieldElement>> { ... }
}
Expand description
A Closure is a piece of tasm code that modifies the top of the stack without access to memory or nondeterminism or standard input/output.
See also: function, algorithm, read_only_algorithm, procedure, accessor, mem_preserver
Required Methods§
fn rust_shadow(&self, stack: &mut Vec<BFieldElement>)
Sourcefn pseudorandom_initial_state(
&self,
seed: [u8; 32],
bench_case: Option<BenchmarkCase>,
) -> Vec<BFieldElement>
fn pseudorandom_initial_state( &self, seed: [u8; 32], bench_case: Option<BenchmarkCase>, ) -> Vec<BFieldElement>
Generate a pseudorandom initial state (in this case, just the opstack) from the given seed.