pub struct Function {
pub id: Option<Identifier>,
pub params: Vec<Pattern>,
pub body: BlockStatement,
/* private fields */
}
Expand description
Function
describes a JS function definition (params
, body
, etc).
Can only be created with super::LexicalContext::enter_function
, to have mandatory
static analysis.
Fields
id: Option<Identifier>
params: Vec<Pattern>
body: BlockStatement
Implementations
sourceimpl Function
impl Function
pub fn bindings_iter(&self) -> FuncBindings<'_>ⓘNotable traits for FuncBindings<'b>impl<'b> Iterator for FuncBindings<'b> type Item = Binding;
pub fn freevars_iter(&self) -> impl Iterator<Item = &Identifier>
Trait Implementations
impl Eq for Function
impl StructuralEq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations
impl RefUnwindSafe for Function
impl !Send for Function
impl !Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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