Module prelude
Available on crate features
dep_pyo3
and std
only.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::*;
Structs§
- Borrowed
- A borrowed equivalent to
Bound
. - Bound
- A GIL-attached equivalent to
Py<T>
. - Py
- A GIL-independent reference to an object allocated on the Python heap.
- PyAny
- Represents any Python object.
- PyClass
Initializer - Initializer for our
#[pyclass]
system. - PyErr
- Represents a Python exception.
- PyModule
- Represents a Python
module
object. - PyRef
- A wrapper type for an immutably borrowed value from a [
Bound<'py, T>
]. - PyRef
Mut - A wrapper type for a mutably borrowed value from a [
Bound<'py, T>
]. - Python
- A marker token that represents holding the GIL.
Traits§
- From
PyObject - Extract a type from a Python object.
- IntoPy
Deprecated - Defines a conversion from a Rust type to a Python object.
- Into
PyObject - Defines a conversion from a Rust type to a Python object, which may fail.
- PyAny
Methods - This trait represents the Python APIs which are usable on all Python objects.
- PyBool
Methods - Implementation of functionality for
PyBool
. - PyByte
Array Methods - Implementation of functionality for
PyByteArray
. - PyBytes
Methods - Implementation of functionality for
PyBytes
. - PyCapsule
Methods - Implementation of functionality for
PyCapsule
. - PyComplex
Methods - Implementation of functionality for
PyComplex
. - PyDict
Methods - Implementation of functionality for
PyDict
. - PyFloat
Methods - Implementation of functionality for
PyFloat
. - PyFrozen
SetMethods - Implementation of functionality for
PyFrozenSet
. - PyList
Methods - Implementation of functionality for
PyList
. - PyMapping
Methods - Implementation of functionality for
PyMapping
. - PyMapping
Proxy Methods - Implementation of functionality for
PyMappingProxy
. - PyModule
Methods - Implementation of functionality for
PyModule
. - PySequence
Methods - Implementation of functionality for
PySequence
. - PySet
Methods - Implementation of functionality for
PySet
. - PySlice
Methods - Implementation of functionality for
PySlice
. - PyString
Methods - Implementation of functionality for
PyString
. - PyTraceback
Methods - Implementation of functionality for
PyTraceback
. - PyTuple
Methods - Implementation of functionality for
PyTuple
. - PyType
Methods - Implementation of functionality for
PyType
. - PyWeakref
Methods - Implementation of functionality for
PyWeakref
. - ToPy
Object Deprecated - Conversion trait that allows various objects to be converted into
PyObject
.