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§
Source§impl 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§
Source§impl Clone for FunctionDecl
impl Clone for FunctionDecl
Source§fn clone(&self) -> FunctionDecl
fn clone(&self) -> FunctionDecl
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 FunctionDecl
impl Debug for FunctionDecl
Source§impl Display for FunctionDecl
impl Display for FunctionDecl
Source§impl Drop for FunctionDecl
impl Drop for FunctionDecl
Source§impl Executable for FunctionDecl
impl Executable for FunctionDecl
Source§impl From<FunctionDecl> for Node
impl From<FunctionDecl> for Node
Source§fn from(decl: FunctionDecl) -> Self
fn from(decl: FunctionDecl) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FunctionDecl
impl PartialEq for FunctionDecl
Source§impl Trace for FunctionDecl
impl Trace for FunctionDecl
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects
impl StructuralPartialEq for FunctionDecl
Auto Trait Implementations§
impl Freeze for FunctionDecl
impl RefUnwindSafe for FunctionDecl
impl !Send for FunctionDecl
impl !Sync for FunctionDecl
impl Unpin for FunctionDecl
impl UnwindSafe for FunctionDecl
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