pub fn to_dict_pyo3<T>(py: Python<'_>, value: &T) -> PyResult<Py<PyDict>>where
T: Serialize,Expand description
Convert a Rust type that implements Serialize to a Python dictionary.
ยงErrors
Returns an error if:
- The Rust value cannot be serialized to JSON.
- The JSON string cannot be parsed into a Python dictionary.
- The Python
jsonmodule fails to import or execute.