pub struct FunctionDefinition {
pub parameter_names: Vec<ArcStr>,
pub body: Expression,
}Expand description
A function defined withing the Egg script.
Functions are defined using the fn operator.
They keep track of their argument names. These are later used to construct a local Scope during function invocation.
The body of the function is an Expression, which is evaluated using the newly created local Scope.
Fields§
§parameter_names: Vec<ArcStr>The names of the parameters of the function.
body: ExpressionThe body of the function.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FunctionDefinition
impl !RefUnwindSafe for FunctionDefinition
impl !Send for FunctionDefinition
impl !Sync for FunctionDefinition
impl Unpin for FunctionDefinition
impl !UnwindSafe for FunctionDefinition
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