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