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::marker::Python;pub use crate::pycell::PyCell;pub use crate::pycell::PyRef;pub use crate::pycell::PyRefMut;pub use crate::pyclass_init::PyClassInitializer;pub use crate::types::PyAny;pub use crate::types::PyModule;
Macros
- wrap_pyfunction
macrosWraps a Rust function annotated with#[pyfunction].
Structs
- RAII type that represents the Global Interpreter Lock acquisition.
- A GIL-independent reference to an object allocated on the Python heap.
- Represents a Python exception.
Type Definitions
- A commonly-used alias for
Py<PyAny>. - Represents the result of a Python call.
Attribute Macros
- pyclass
macros - pyfunction
macrosA proc macro used to expose Rust functions to Python. - pymethods
macrosA proc macro used to expose methods to Python. - pymodule
macrosA proc macro used to implement Python modules.
Derive Macros
- FromPyObject
macros