pub struct Function {
pub ident: String,
pub params: Vec<Parameter>,
pub body: Vec<StatementNode>,
pub return_type: VarType,
}
Expand description
A function statement, the basis for the whole language.
§Syntax example
fun number_adder(first_num: int, second_num: int) -> int {
// --snip--
}
Fields§
§ident: String
§params: Vec<Parameter>
§body: Vec<StatementNode>
§return_type: VarType
Trait Implementations§
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Freeze for Function
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