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

Function object_entries

crates/wasm/src/convert.rs:165–173  ·  view source on GitHub ↗
(obj: &Object)

Source from the content-addressed store, hash-verified

163}
164
165pub fn object_entries(obj: &Object) -> impl Iterator<Item = Result<(JsValue, JsValue), JsValue>> {
166 Object::entries(obj).values().into_iter().map(|pair| {
167 pair.map(|pair| {
168 let key = Reflect::get(&pair, &"0".into()).unwrap();
169 let val = Reflect::get(&pair, &"1".into()).unwrap();
170 (key, val)
171 })
172 })
173}
174
175pub fn pyresult_to_js_result(vm: &VirtualMachine, result: PyResult) -> Result<JsValue, JsValue> {
176 result

Callers 4

inject_moduleMethod · 0.85
inject_js_moduleMethod · 0.85
py_to_jsFunction · 0.85
js_to_pyFunction · 0.85

Calls 5

getFunction · 0.85
mapMethod · 0.45
into_iterMethod · 0.45
valuesMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected