pub struct FunctionInfo {
pub name: Option<JsString>,
pub param_count: usize,
pub is_generator: bool,
pub is_async: bool,
pub is_arrow: bool,
pub uses_arguments: bool,
pub uses_this: bool,
pub param_names: Vec<JsString>,
pub rest_param: Option<usize>,
pub binding_count: usize,
}Expand description
Function metadata
Fields§
§name: Option<JsString>Function name (if any)
param_count: usizeNumber of parameters
is_generator: boolWhether this is a generator function
is_async: boolWhether this is an async function
is_arrow: boolWhether this is an arrow function
uses_arguments: boolWhether function uses arguments
uses_this: boolWhether function uses this
param_names: Vec<JsString>Parameter names (for creating environment)
rest_param: Option<usize>Rest parameter index (if any)
binding_count: usizeExpected number of bindings in the function’s environment Used to pre-size the HashMap to avoid resizing during execution
Implementations§
Trait Implementations§
Source§impl Clone for FunctionInfo
impl Clone for FunctionInfo
Source§fn clone(&self) -> FunctionInfo
fn clone(&self) -> FunctionInfo
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 moreAuto Trait Implementations§
impl Freeze for FunctionInfo
impl RefUnwindSafe for FunctionInfo
impl !Send for FunctionInfo
impl !Sync for FunctionInfo
impl Unpin for FunctionInfo
impl UnwindSafe for FunctionInfo
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