pub struct Function {
pub name: String,
pub overloads: Vec<FunctionOverload>,
}Expand description
A function.
Fields§
§name: StringFunction’s name
overloads: Vec<FunctionOverload>Function’s overloads.
Implementations§
source§impl Function
impl Function
sourcepub fn match_params(expected: &Vec<Type>, received: &Vec<Type>) -> bool
pub fn match_params(expected: &Vec<Type>, received: &Vec<Type>) -> bool
Checks if the given params can be converted into the expected params.
sourcepub fn get_overload(&self, params: &Vec<Type>) -> Option<&FunctionOverload>
pub fn get_overload(&self, params: &Vec<Type>) -> Option<&FunctionOverload>
Tries to find an overload for the given param types.