pub struct Function<'a> {
pub range: Range,
pub name: Option<&'a str>,
pub arguments: Vec<Argument<'a>>,
pub ret_type: Option<Ty<'a>>,
pub body: Exp<'a>,
}Expand description
A function definition.
Fields§
§range: RangeSource range of the function.
name: Option<&'a str>Name of the function if it is a named global, None for closures.
arguments: Vec<Argument<'a>>The list of arguments to the function.
ret_type: Option<Ty<'a>>The return type specification, if present.
body: Exp<'a>The function body expression.
Trait Implementations§
impl<'a> Eq for Function<'a>
impl<'a> StructuralPartialEq for Function<'a>
Auto Trait Implementations§
impl<'a> Freeze for Function<'a>
impl<'a> RefUnwindSafe for Function<'a>
impl<'a> Send for Function<'a>
impl<'a> Sync for Function<'a>
impl<'a> Unpin for Function<'a>
impl<'a> UnwindSafe for Function<'a>
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