Enum tasm_lib::list::higher_order::inner_function::InnerFunction
source · pub enum InnerFunction {
RawCode(RawCode),
Snippet(Box<dyn Snippet>),
NoFunctionBody(NoFunctionBody),
}
Variants§
Implementations§
source§impl InnerFunction
impl InnerFunction
sourcepub fn get_input_types(&self) -> Vec<DataType>
pub fn get_input_types(&self) -> Vec<DataType>
Return the input types this inner function accepts
sourcepub fn input_list_element_type(&self) -> DataType
pub fn input_list_element_type(&self) -> DataType
Return the expected type of list element this function accepts
sourcepub fn additional_inputs(&self) -> Vec<DataType>
pub fn additional_inputs(&self) -> Vec<DataType>
Return all input types apart from the element type of the input list. May be the empty list.
sourcepub fn size_of_additional_inputs(&self) -> usize
pub fn size_of_additional_inputs(&self) -> usize
Return the size in words for the additional elements, all elements apart from the element from the input list.
sourcepub fn get_output_types(&self) -> Vec<DataType>
pub fn get_output_types(&self) -> Vec<DataType>
Return types this function outputs.
sourcepub fn entrypoint(&self) -> String
pub fn entrypoint(&self) -> String
Return the entrypoint, label, of the inner function. Used to make a call to this function.
sourcepub fn rust_shadowing(
&self,
std_in: &[BFieldElement],
secret_in: &[BFieldElement],
stack: &mut Vec<BFieldElement>,
memory: &mut HashMap<BFieldElement, BFieldElement>
)
pub fn rust_shadowing( &self, std_in: &[BFieldElement], secret_in: &[BFieldElement], stack: &mut Vec<BFieldElement>, memory: &mut HashMap<BFieldElement, BFieldElement> )
For testing purposes, this function can mirror what the TASM code does.
Auto Trait Implementations§
impl !RefUnwindSafe for InnerFunction
impl !Send for InnerFunction
impl !Sync for InnerFunction
impl Unpin for InnerFunction
impl !UnwindSafe for InnerFunction
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