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