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

Method to_pyobject

examples/call_between_rust_and_python.rs:54–57  ·  view source on GitHub ↗
(self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

52
53 impl ToPyObject for NumVec {
54 fn to_pyobject(self, vm: &VirtualMachine) -> PyObjectRef {
55 let list = self.0.into_iter().map(|e| vm.new_pyobj(e)).collect();
56 vm.ctx.new_list(list).to_pyobject(vm)
57 }
58 }
59
60 #[pyattr]

Callers

nothing calls this directly

Calls 5

collectMethod · 0.80
new_pyobjMethod · 0.80
new_listMethod · 0.80
mapMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected