Module pyo3::prelude[][src]

Expand description

PyO3’s prelude.

The purpose of this module is to alleviate imports of many commonly used items of the PyO3 crate by adding a glob import to the top of pyo3 heavy modules:

use pyo3::prelude::*;

Re-exports

pub use crate::conversion::FromPyObject;
pub use crate::conversion::IntoPy;
pub use crate::conversion::IntoPyPointer;
pub use crate::conversion::PyTryFrom;
pub use crate::conversion::PyTryInto;
pub use crate::conversion::ToPyObject;
pub use crate::pycell::PyCell;
pub use crate::pycell::PyRef;
pub use crate::pycell::PyRefMut;
pub use crate::pyclass_init::PyClassInitializer;
pub use crate::wrap_pyfunction;

Structs

RAII type that represents the Global Interpreter Lock acquisition.

A GIL-independent reference to an object allocated on the Python heap.

Represents any Python object.

Represents a Python exception that was raised.

Represents a Python module object.

A marker token that represents holding the GIL.

Type Definitions

A commonly-used alias for Py<PyAny>.

Represents the result of a Python call.

Attribute Macros

pyclassmacros

A proc macro used to expose Rust structs as Python objects.

A proc macro used to expose Rust functions to Python.

pymethodsmacros

A proc macro used to expose methods to Python.

pymodulemacros

A proc macro used to implement Python modules.

pyprotomacros

A proc macro used to implement Python’s dunder methods.

Derive Macros