Module pyo3::conversion
source · Expand description
Defines conversions between Rust and Python types.
Traits§
- Returns a borrowed pointer to a Python object.
- Extract a type from a Python object.
- Expected form of
FromPyObject
to be used in a future PyO3 release. - FromPyPointerDeprecatedRaw level conversion between
*mut ffi::PyObject
and PyO3 types. - Defines a conversion from a Rust type to a Python object.
- PyTryFromDeprecatedTrait implemented by Python object types that allow a checked downcast. If
T
implementsPyTryFrom
, we can convert&PyAny
to&T
. - PyTryIntoDeprecatedTrait implemented by Python object types that allow a checked downcast. This trait is similar to
std::convert::TryInto
- Conversion trait that allows various objects to be converted into
PyObject
.