MCPcopy Index your code
hub / github.com/RustPython/RustPython / call_method

Method call_method

crates/wasm/src/js_module.rs:194–204  ·  view source on GitHub ↗
(
            &self,
            name: JsProperty,
            args: PosArgs<PyJsValueRef>,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

192
193 #[pymethod]
194 fn call_method(
195 &self,
196 name: JsProperty,
197 args: PosArgs<PyJsValueRef>,
198 vm: &VirtualMachine,
199 ) -> PyResult<PyJsValue> {
200 let js_args = args.iter().map(|x| -> &PyJsValue { x }).collect::<Array>();
201 call_method(&self.value, &name.into_js_value(), &js_args)
202 .map(PyJsValue::new)
203 .map_err(|err| new_js_error(vm, err))
204 }
205
206 #[pymethod]
207 fn construct(

Callers

nothing calls this directly

Calls 4

new_js_errorFunction · 0.85
into_js_valueMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected