(vm: &VirtualMachine, obj: &PyObject, field: &'static str, typ: &str)
| 69 | } |
| 70 | |
| 71 | fn get_node_field(vm: &VirtualMachine, obj: &PyObject, field: &'static str, typ: &str) -> PyResult { |
| 72 | vm.get_attribute_opt(obj.to_owned(), field)? |
| 73 | .ok_or_else(|| vm.new_type_error(format!(r#"required field "{field}" missing from {typ}"#))) |
| 74 | } |
| 75 | |
| 76 | fn get_node_field_opt( |
| 77 | vm: &VirtualMachine, |
no test coverage detected