pub fn from_dict_pyo3<T>(py: Python<'_>, values: Py<PyDict>) -> Result<T, PyErr>where
T: DeserializeOwned,
Expand description
Convert a Python dictionary to a Rust type that implements DeserializeOwned
.
ยงErrors
Returns an error if:
- The Python dictionary cannot be serialized to JSON.
- The JSON string cannot be deserialized to type
T
. - The Python
json
module fails to import or execute.