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>,
param_group: Option<&Type>
) -> bool
pub fn match_params( expected: &Vec<Type>, received: &Vec<Type>, param_group: Option<&Type> ) -> bool
Checks if the given params can be converted into the expected params.
Panics
Never. Shut up, clippy.
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.
pub fn get_returned(&self, params: &Vec<Type>) -> Type
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Function
impl !Send for Function
impl !Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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