Struct boa::syntax::ast::node::declaration::function_decl::FunctionDecl
source · [−]pub struct FunctionDecl { /* private fields */ }
Expand description
The function
declaration (function statement) defines a function with the specified
parameters.
A function created with a function declaration is a Function
object and has all the
properties, methods and behavior of Function
.
A function can also be created using an expression (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 FunctionDecl
impl FunctionDecl
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 FunctionDecl
impl Clone for FunctionDecl
sourcefn clone(&self) -> FunctionDecl
fn clone(&self) -> FunctionDecl
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 FunctionDecl
impl Debug for FunctionDecl
sourceimpl Display for FunctionDecl
impl Display for FunctionDecl
sourceimpl Drop for FunctionDecl
impl Drop for FunctionDecl
sourceimpl Executable for FunctionDecl
impl Executable for FunctionDecl
sourceimpl Finalize for FunctionDecl
impl Finalize for FunctionDecl
sourceimpl From<FunctionDecl> for Node
impl From<FunctionDecl> for Node
sourcefn from(decl: FunctionDecl) -> Self
fn from(decl: FunctionDecl) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<FunctionDecl> for FunctionDecl
impl PartialEq<FunctionDecl> for FunctionDecl
sourcefn eq(&self, other: &FunctionDecl) -> bool
fn eq(&self, other: &FunctionDecl) -> bool
sourceimpl Trace for FunctionDecl
impl Trace for FunctionDecl
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl StructuralPartialEq for FunctionDecl
Auto Trait Implementations
impl RefUnwindSafe for FunctionDecl
impl !Send for FunctionDecl
impl !Sync for FunctionDecl
impl Unpin for FunctionDecl
impl UnwindSafe for FunctionDecl
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