execute_function_body

Function execute_function_body 

Source
pub async fn execute_function_body<F>(
    env: &mut Env,
    function: Rc<Function>,
    fields: Vec<Field>,
    modifier: F,
) -> Result
where F: FnOnce(&mut Env),
Expand description

Executes the body of the function.

The given function is executed in the given environment. The fields are passed as positional parameters to the function except for the first field which is the name of the function.

The modifier function is called with the environment after the new variable context is pushed to the environment. This is useful for assigning custom local variables before the function body is executed.