Skip to main content

JsFunctionObject

Trait JsFunctionObject 

Source
pub trait JsFunctionObject: JsObject {
    // Required methods
    fn get_function_object_base_mut(&mut self) -> &mut FunctionObjectBase;
    fn get_function_object_base(&self) -> &FunctionObjectBase;
    fn as_js_function_object(&self) -> &dyn JsFunctionObject;
    fn as_js_function_object_mut(&mut self) -> &mut dyn JsFunctionObject;

    // Provided methods
    fn call(
        &self,
        fat_self: &JsObjectType,
        ctx_stack: &mut ExecutionContextStack,
        _this: JsValueOrSelf<'_>,
        _args: Vec<JsValue>,
    ) -> Result<JsValue, JErrorType> { ... }
    fn construct(
        &self,
        _args: Vec<JsValue>,
        _o: JsObjectType,
    ) -> Result<JsValue, JErrorType> { ... }
}

Required Methods§

Provided Methods§

Source

fn call( &self, fat_self: &JsObjectType, ctx_stack: &mut ExecutionContextStack, _this: JsValueOrSelf<'_>, _args: Vec<JsValue>, ) -> Result<JsValue, JErrorType>

Source

fn construct( &self, _args: Vec<JsValue>, _o: JsObjectType, ) -> Result<JsValue, JErrorType>

Implementors§