pub enum Function {
Native {
function: BuiltInFunction,
constructable: bool,
},
Closure {
function: Box<dyn ClosureFunction>,
constructable: bool,
captures: Captures,
},
Ordinary {
flags: FunctionFlags,
body: RcStatementList,
params: Box<[FormalParameter]>,
environment: Environment,
},
}
Expand description
Boa representation of a Function Object.
FunctionBody is specific to this interpreter, it will either be Rust code or JavaScript code (AST Node)
Variants§
Native
Closure
Ordinary
Fields
§
flags: FunctionFlags
§
body: RcStatementList
§
params: Box<[FormalParameter]>
§
environment: Environment
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Function
impl !RefUnwindSafe for Function
impl !Send for Function
impl !Sync for Function
impl Unpin for Function
impl !UnwindSafe for Function
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