Trait FunctionDefinition

Source
pub trait FunctionDefinition {
    // Required methods
    fn required_parameters(&self) -> usize;
    fn optional_parameters(&self) -> usize;
    fn check_types(&self, args: &[VariableType]) -> FunctionTypecheck;
    fn call(&self, args: Arguments<'_>) -> Result<Variable>;
    fn param_type(&self, index: usize) -> Option<VariableType>;
    fn param_type_str(&self, index: usize) -> String;
    fn return_type(&self) -> VariableType;
    fn return_type_str(&self) -> String;
}

Required Methods§

Implementors§