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::ToPyObject;
Deprecated pub use crate::conversion::FromPyObject;
pub use crate::conversion::IntoPy;
pub use crate::conversion::IntoPyObject;
pub use crate::marker::Python;
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§
- Wraps a Rust function annotated with
#[pyfunction]
. - wrap_
pyfunction_ bound Deprecated Wraps a Rust function annotated with#[pyfunction]
.
Structs§
- A borrowed equivalent to
Bound
. - A GIL-attached equivalent to
Py<T>
. - A GIL-independent reference to an object allocated on the Python heap.
- Represents a Python exception.
Traits§
- This trait represents the Python APIs which are usable on all Python objects.
- Implementation of functionality for
PyBool
. - Implementation of functionality for
PyByteArray
. - Implementation of functionality for
PyBytes
. - Implementation of functionality for
PyCapsule
. - Implementation of functionality for
PyComplex
. - Implementation of functionality for
PyDict
. - Implementation of functionality for
PyFloat
. - Implementation of functionality for
PyFrozenSet
. - Implementation of functionality for
PyList
. - Implementation of functionality for
PyMapping
. - Implementation of functionality for
PyModule
. - Implementation of functionality for
PySequence
. - Implementation of functionality for
PySet
. - Implementation of functionality for
PySlice
. - Implementation of functionality for
PyString
. - Implementation of functionality for
PyTraceback
. - Implementation of functionality for
PyTuple
. - Implementation of functionality for
PyType
. - Implementation of functionality for
PyWeakref
.
Type Aliases§
- A commonly-used alias for
Py<PyAny>
. - Represents the result of a Python call.
Attribute Macros§
- A proc macro used to expose Rust functions to Python.
- A proc macro used to expose methods to Python.
- A proc macro used to implement Python modules.