pub struct JSFunction {Show 13 fields
pub base: JSObject,
pub name: Atom,
pub param_count: u32,
pub locals_count: u32,
pub arity: u32,
pub builtin_atom: Option<Atom>,
pub builtin_func: Option<HostFunc>,
pub upvalues: Option<Box<UpvalueData>>,
pub bytecode: Option<Box<Bytecode>>,
pub shared_nb_for_ic: Option<Arc<NestedBytecode>>,
pub cached_prototype_ptr: *mut JSObject,
pub source_filename: String,
pub line_number_table: Option<LineNumberTable>,
/* private fields */
}Fields§
§base: JSObject§name: Atom§param_count: u32§locals_count: u32§arity: u32§builtin_atom: Option<Atom>§builtin_func: Option<HostFunc>§upvalues: Option<Box<UpvalueData>>§bytecode: Option<Box<Bytecode>>§cached_prototype_ptr: *mut JSObject§source_filename: String§line_number_table: Option<LineNumberTable>Implementations§
Source§impl JSFunction
impl JSFunction
pub fn new() -> Self
pub fn new_builtin(name: Atom, arity: u32) -> Self
pub fn with_upvalues(self, upvalues_map: FxHashMap<Atom, JSValue>) -> Self
pub fn is_callable(&self) -> bool
pub fn is_arrow(&self) -> bool
pub fn set_is_arrow(&mut self, val: bool)
pub fn is_async(&self) -> bool
pub fn set_is_async(&mut self, val: bool)
pub fn is_generator(&self) -> bool
pub fn set_is_generator(&mut self, val: bool)
pub fn is_builtin(&self) -> bool
pub fn set_is_builtin(&mut self, val: bool)
pub fn uses_arguments(&self) -> bool
pub fn set_uses_arguments(&mut self, val: bool)
pub fn is_strict(&self) -> bool
pub fn set_is_strict(&mut self, val: bool)
pub fn has_symbol_on_base(&self) -> bool
pub fn mark_has_symbol_prop(&mut self)
pub fn upvalues_mut(&mut self) -> &mut UpvalueData
pub fn upvalues_ref(&self) -> Option<&UpvalueData>
pub fn set_builtin_marker(&mut self, ctx: &mut JSContext, builtin_name: &str)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JSFunction
impl !RefUnwindSafe for JSFunction
impl !Send for JSFunction
impl !Sync for JSFunction
impl Unpin for JSFunction
impl UnsafeUnpin for JSFunction
impl !UnwindSafe for JSFunction
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