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.
- Raw level conversion between
*mut ffi::PyObject
and PyO3 types. - Defines a conversion from a Rust type to a Python object.
- Trait implemented by Python object types that allow a checked downcast. If
T
implementsPyTryFrom
, we can convert&PyAny
to&T
. - Trait 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
.