[−][src]Module pyo3::conversion
Conversions between various states of Rust and Python types and their wrappers.
Traits
AsPyPointer | This trait represents that we can do zero-cost conversion from the object to a FFI pointer. |
FromPy | Similar to std::convert::From, just that it requires a gil token. |
FromPyObject |
|
FromPyPointer | Raw level conversion between |
IntoPy | Similar to std::convert::Into, just that it requires a gil token. |
IntoPyPointer | This trait allows retrieving the underlying FFI pointer from Python objects. |
PyTryFrom | Trait implemented by Python object types that allow a checked downcast.
If |
PyTryInto | Trait implemented by Python object types that allow a checked downcast.
This trait is similar to |
ToBorrowedObject | This trait has two implementations: The slow one is implemented for all ToPyObject and creates a new object using ToPyObject::to_object, while the fast one is only implemented for AsPyPointer (we know that every AsPyPointer is also ToPyObject) and uses AsPyPointer::as_ptr() |
ToPyObject | Conversion trait that allows various objects to be converted into |