pub struct FunctionExpr { /* private fields */ }
Expand description
The function
expression defines a function with the specified parameters.
A function created with a function expression is a Function
object and has all the
properties, methods and behavior of Function
.
A function can also be created using a declaration (see function expression).
By default, functions return undefined
. To return any other value, the function must have
a return statement that specifies the value to return.
More information:
Implementations§
Source§impl FunctionExpr
impl FunctionExpr
Sourcepub fn parameters(&self) -> &[FormalParameter]
pub fn parameters(&self) -> &[FormalParameter]
Gets the list of parameters of the function declaration.
Sourcepub fn body(&self) -> &StatementList
pub fn body(&self) -> &StatementList
Gets the body of the function declaration.
Trait Implementations§
Source§impl Clone for FunctionExpr
impl Clone for FunctionExpr
Source§fn clone(&self) -> FunctionExpr
fn clone(&self) -> FunctionExpr
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FunctionExpr
impl Debug for FunctionExpr
Source§impl Display for FunctionExpr
impl Display for FunctionExpr
Source§impl Drop for FunctionExpr
impl Drop for FunctionExpr
Source§impl Executable for FunctionExpr
impl Executable for FunctionExpr
Source§impl From<FunctionExpr> for Node
impl From<FunctionExpr> for Node
Source§fn from(expr: FunctionExpr) -> Self
fn from(expr: FunctionExpr) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FunctionExpr
impl PartialEq for FunctionExpr
Source§impl Trace for FunctionExpr
impl Trace for FunctionExpr
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects
impl StructuralPartialEq for FunctionExpr
Auto Trait Implementations§
impl Freeze for FunctionExpr
impl RefUnwindSafe for FunctionExpr
impl !Send for FunctionExpr
impl !Sync for FunctionExpr
impl Unpin for FunctionExpr
impl UnwindSafe for FunctionExpr
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