Struct boa::syntax::ast::node::declaration::function_expr::FunctionExpr
source · [−]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
sourceimpl 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
sourceimpl Clone for FunctionExpr
impl Clone for FunctionExpr
sourcefn clone(&self) -> FunctionExpr
fn clone(&self) -> FunctionExpr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FunctionExpr
impl Debug for FunctionExpr
sourceimpl Display for FunctionExpr
impl Display for FunctionExpr
sourceimpl Drop for FunctionExpr
impl Drop for FunctionExpr
sourceimpl Executable for FunctionExpr
impl Executable for FunctionExpr
sourceimpl Finalize for FunctionExpr
impl Finalize for FunctionExpr
sourceimpl From<FunctionExpr> for Node
impl From<FunctionExpr> for Node
sourcefn from(expr: FunctionExpr) -> Self
fn from(expr: FunctionExpr) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<FunctionExpr> for FunctionExpr
impl PartialEq<FunctionExpr> for FunctionExpr
sourcefn eq(&self, other: &FunctionExpr) -> bool
fn eq(&self, other: &FunctionExpr) -> bool
sourceimpl Trace for FunctionExpr
impl Trace for FunctionExpr
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl StructuralPartialEq for FunctionExpr
Auto Trait Implementations
impl RefUnwindSafe for FunctionExpr
impl !Send for FunctionExpr
impl !Sync for FunctionExpr
impl Unpin for FunctionExpr
impl UnwindSafe for FunctionExpr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more