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::PyObjectand PyO3 types. - Defines a conversion from a Rust type to a Python object.
- Returns an owned pointer to a Python object.
- Trait implemented by Python object types that allow a checked downcast. If
TimplementsPyTryFrom, we can convert&PyAnyto&T. - Trait implemented by Python object types that allow a checked downcast. This trait is similar to
std::convert::TryInto - ToBorrowedObjectDeprecatedA deprecated conversion trait which relied on the unstable
specializationfeature of the Rust language. - Conversion trait that allows various objects to be converted into
PyObject.