pub trait BasicSnippet {
// Required methods
fn inputs(&self) -> Vec<(DataType, String)>;
fn outputs(&self) -> Vec<(DataType, String)>;
fn entrypoint(&self) -> String;
fn code(&self, library: &mut Library) -> Vec<LabelledInstruction>;
// Provided methods
fn annotated_code(&self, library: &mut Library) -> Vec<LabelledInstruction> { ... }
fn link_for_isolated_run(&self) -> Vec<LabelledInstruction> { ... }
fn init_stack_for_isolated_run(&self) -> Vec<BFieldElement> { ... }
fn stack_diff(&self) -> isize { ... }
}
Required Methods§
fn inputs(&self) -> Vec<(DataType, String)>
fn outputs(&self) -> Vec<(DataType, String)>
fn entrypoint(&self) -> String
fn code(&self, library: &mut Library) -> Vec<LabelledInstruction>
Provided Methods§
fn annotated_code(&self, library: &mut Library) -> Vec<LabelledInstruction>
fn link_for_isolated_run(&self) -> Vec<LabelledInstruction>
Sourcefn init_stack_for_isolated_run(&self) -> Vec<BFieldElement>
fn init_stack_for_isolated_run(&self) -> Vec<BFieldElement>
Intial stack on program start, when the snippet runs in isolation.