FunctionBodyObject

Trait FunctionBodyObject 

Source
pub trait FunctionBodyObject: Debug + Display {
    // Required method
    fn execute<'a>(
        &'a self,
        env: &'a mut Env,
    ) -> Pin<Box<dyn Future<Output = Result> + 'a>>;
}
Expand description

Dyn-compatible adapter for the FunctionBody trait

This is a dyn-compatible version of the FunctionBody trait.

This trait is automatically implemented for all types that implement FunctionBody.

Required Methods§

Source

fn execute<'a>( &'a self, env: &'a mut Env, ) -> Pin<Box<dyn Future<Output = Result> + 'a>>

Executes the function body in the given environment.

The implementation of this method is expected to update env.exit_status reflecting the result of the function execution.

Implementors§