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.
Returns an owned pointer to a Python object.
Trait implemented by Python object types that allow a checked downcast.
If T
implements PyTryFrom
, 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
ToBorrowedObjectDeprecated
A deprecated conversion trait which relied on the unstable specialization
feature
of the Rust language.
Conversion trait that allows various objects to be converted into PyObject
.