Module pyo3::prelude[][src]

Expand description

A collection of items you most likely want to have in scope when working with pyo3

The purpose of this module is to alleviate imports of many common pyo3 traits by adding a glob import to the top of pyo3 heavy modules:

use pyo3::prelude::*;

Re-exports

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

Structs

RAII type that represents the Global Interpreter Lock acquisition. To get hold of a value of this type, see Python::acquire_gil.

A Python object of known type T.

A Python object with GIL lifetime

Represents a Python exception that was raised.

Represents a Python module object.

Marker type that indicates that the GIL is currently held.

Type Definitions

A commonly-used alias for Py<PyAny>.

Represents the result of a Python call.

Attribute Macros

Internally, this proc macro create a new c function called PyInit_{my_module} that then calls the init function you provided

Derive Macros