Skip to main content

hashmap_to_pydict_pyo3

Function hashmap_to_pydict_pyo3 

Source
pub fn hashmap_to_pydict_pyo3<K, V, S>(
    py: Python<'_>,
    value: &HashMap<K, V, S>,
) -> PyResult<Py<PyAny>>
where K: for<'py> IntoPyObject<'py> + Clone, V: for<'py> IntoPyObject<'py> + Clone, S: BuildHasher,
Expand description

Convert a HashMap to a Python dict using typed PyO3 keys and values.

ยงErrors

Returns an error if any key or value cannot be converted to Python.