Trait pyo3::types::IntoPyDict
source · pub trait IntoPyDict: Sized {
// Required method
fn into_py_dict_bound(self, py: Python<'_>) -> Bound<'_, PyDict>;
// Provided method
fn into_py_dict(self, py: Python<'_>) -> &PyDict { ... }
}Expand description
Conversion trait that allows a sequence of tuples to be converted into PyDict
Primary use case for this trait is call and call_method methods as keywords argument.
Required Methods§
sourcefn into_py_dict_bound(self, py: Python<'_>) -> Bound<'_, PyDict>
fn into_py_dict_bound(self, py: Python<'_>) -> Bound<'_, PyDict>
Converts self into a PyDict object pointer. Whether pointer owned or borrowed
depends on implementation.
Provided Methods§
sourcefn into_py_dict(self, py: Python<'_>) -> &PyDict
👎Deprecated since 0.21.0: IntoPyDict::into_py_dict will be replaced by IntoPyDict::into_py_dict_bound in a future PyO3 versionAvailable on crate feature gil-refs only.
fn into_py_dict(self, py: Python<'_>) -> &PyDict
IntoPyDict::into_py_dict will be replaced by IntoPyDict::into_py_dict_bound in a future PyO3 versiongil-refs only.Converts self into a PyDict object pointer. Whether pointer owned or borrowed
depends on implementation.
Object Safety§
This trait is not object safe.