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::IntoPyObject;
pub use crate::conversion::IntoPy;
Deprecated pub use crate::conversion::ToPyObject;
Deprecated pub use crate::err::PyErr;
pub use crate::err::PyResult;
pub use crate::instance::Borrowed;
pub use crate::instance::Bound;
pub use crate::instance::Py;
pub use crate::instance::PyObject;
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;
pub use crate::wrap_pyfunction;
macros
pub use crate::wrap_pyfunction_bound;
Deprecated macros
pub use crate::types::any::PyAnyMethods;
pub use crate::types::boolobject::PyBoolMethods;
pub use crate::types::bytearray::PyByteArrayMethods;
pub use crate::types::bytes::PyBytesMethods;
pub use crate::types::capsule::PyCapsuleMethods;
pub use crate::types::complex::PyComplexMethods;
pub use crate::types::dict::PyDictMethods;
pub use crate::types::float::PyFloatMethods;
pub use crate::types::frozenset::PyFrozenSetMethods;
pub use crate::types::list::PyListMethods;
pub use crate::types::mapping::PyMappingMethods;
pub use crate::types::mappingproxy::PyMappingProxyMethods;
pub use crate::types::module::PyModuleMethods;
pub use crate::types::sequence::PySequenceMethods;
pub use crate::types::set::PySetMethods;
pub use crate::types::slice::PySliceMethods;
pub use crate::types::string::PyStringMethods;
pub use crate::types::traceback::PyTracebackMethods;
pub use crate::types::tuple::PyTupleMethods;
pub use crate::types::typeobject::PyTypeMethods;
pub use crate::types::weakref::PyWeakrefMethods;
Attribute Macros§
- pyclass
macros
- pyfunction
macros
A proc macro used to expose Rust functions to Python. - pymethods
macros
A proc macro used to expose methods to Python. - pymodule
macros
A proc macro used to implement Python modules.
Derive Macros§
- From
PyObject macros
- Into
PyObject macros
- Into
PyObject Ref macros