Trait pyo3::types::DerefToPyAny

source ·
pub trait DerefToPyAny { }
Expand description

Python objects that have a base type.

This marks types that can be upcast into a PyAny and used in its place. This essentially includes every Python object except PyAny itself.

This is used to provide the Deref<Target = Bound<'_, PyAny>> implementations for Bound<'_, T>.

Users should not need to implement this trait directly. It’s implementation is provided by the #[pyclass] attribute.

§Note

This is needed because the compiler currently tries to figure out all the types in a deref-chain before starting to look for applicable method calls. So we need to prevent Bound<'_, PyAny dereferencing to itself in order to avoid running into the recursion limit. This trait is used to exclude this from our blanket implementation. See this Rust issue for more details. If the compiler limitation gets resolved, this trait will be removed.

Implementors§

source§

impl DerefToPyAny for Coroutine

source§

impl DerefToPyAny for CancelledError

source§

impl DerefToPyAny for IncompleteReadError

source§

impl DerefToPyAny for InvalidStateError

source§

impl DerefToPyAny for LimitOverrunError

source§

impl DerefToPyAny for QueueEmpty

source§

impl DerefToPyAny for QueueFull

source§

impl DerefToPyAny for TimeoutError

source§

impl DerefToPyAny for gaierror

source§

impl DerefToPyAny for herror

source§

impl DerefToPyAny for timeout

source§

impl DerefToPyAny for PyArithmeticError

source§

impl DerefToPyAny for PyAssertionError

source§

impl DerefToPyAny for PyAttributeError

source§

impl DerefToPyAny for PyBaseException

source§

impl DerefToPyAny for PyBlockingIOError

source§

impl DerefToPyAny for PyBrokenPipeError

source§

impl DerefToPyAny for PyBufferError

source§

impl DerefToPyAny for PyBytesWarning

source§

impl DerefToPyAny for PyChildProcessError

source§

impl DerefToPyAny for PyConnectionAbortedError

source§

impl DerefToPyAny for PyConnectionError

source§

impl DerefToPyAny for PyConnectionRefusedError

source§

impl DerefToPyAny for PyConnectionResetError

source§

impl DerefToPyAny for PyDeprecationWarning

source§

impl DerefToPyAny for PyEOFError

source§

impl DerefToPyAny for PyEnvironmentError

source§

impl DerefToPyAny for PyException

source§

impl DerefToPyAny for PyFileExistsError

source§

impl DerefToPyAny for PyFileNotFoundError

source§

impl DerefToPyAny for PyFloatingPointError

source§

impl DerefToPyAny for PyFutureWarning

source§

impl DerefToPyAny for PyGeneratorExit

source§

impl DerefToPyAny for PyIOError

source§

impl DerefToPyAny for PyImportError

source§

impl DerefToPyAny for PyImportWarning

source§

impl DerefToPyAny for PyIndexError

source§

impl DerefToPyAny for PyInterruptedError

source§

impl DerefToPyAny for PyIsADirectoryError

source§

impl DerefToPyAny for PyKeyError

source§

impl DerefToPyAny for PyKeyboardInterrupt

source§

impl DerefToPyAny for PyLookupError

source§

impl DerefToPyAny for PyMemoryError

source§

impl DerefToPyAny for PyModuleNotFoundError

source§

impl DerefToPyAny for PyNameError

source§

impl DerefToPyAny for PyNotADirectoryError

source§

impl DerefToPyAny for PyNotImplementedError

source§

impl DerefToPyAny for PyOSError

source§

impl DerefToPyAny for PyOverflowError

source§

impl DerefToPyAny for PyPendingDeprecationWarning

source§

impl DerefToPyAny for PyPermissionError

source§

impl DerefToPyAny for PyProcessLookupError

source§

impl DerefToPyAny for PyRecursionError

source§

impl DerefToPyAny for PyReferenceError

source§

impl DerefToPyAny for PyResourceWarning

source§

impl DerefToPyAny for PyRuntimeError

source§

impl DerefToPyAny for PyRuntimeWarning

source§

impl DerefToPyAny for PyStopAsyncIteration

source§

impl DerefToPyAny for PyStopIteration

source§

impl DerefToPyAny for PySyntaxError

source§

impl DerefToPyAny for PySyntaxWarning

source§

impl DerefToPyAny for PySystemError

source§

impl DerefToPyAny for PySystemExit

source§

impl DerefToPyAny for PyTimeoutError

source§

impl DerefToPyAny for PyTypeError

source§

impl DerefToPyAny for PyUnboundLocalError

source§

impl DerefToPyAny for PyUnicodeDecodeError

source§

impl DerefToPyAny for PyUnicodeEncodeError

source§

impl DerefToPyAny for PyUnicodeError

source§

impl DerefToPyAny for PyUnicodeTranslateError

source§

impl DerefToPyAny for PyUnicodeWarning

source§

impl DerefToPyAny for PyUserWarning

source§

impl DerefToPyAny for PyValueError

source§

impl DerefToPyAny for PyWarning

source§

impl DerefToPyAny for PyZeroDivisionError

source§

impl DerefToPyAny for PanicException

source§

impl DerefToPyAny for PyBool

source§

impl DerefToPyAny for PyByteArray

source§

impl DerefToPyAny for PyBytes

source§

impl DerefToPyAny for PyCFunction

source§

impl DerefToPyAny for PyCapsule

source§

impl DerefToPyAny for PyCode

source§

impl DerefToPyAny for PyComplex

source§

impl DerefToPyAny for PyDate

source§

impl DerefToPyAny for PyDateTime

source§

impl DerefToPyAny for PyDelta

source§

impl DerefToPyAny for PyDict

source§

impl DerefToPyAny for PyDictItems

source§

impl DerefToPyAny for PyDictKeys

source§

impl DerefToPyAny for PyDictValues

source§

impl DerefToPyAny for PyEllipsis

source§

impl DerefToPyAny for PyFloat

source§

impl DerefToPyAny for PyFrame

source§

impl DerefToPyAny for PyFrozenSet

source§

impl DerefToPyAny for PyFunction

source§

impl DerefToPyAny for PyIterator

source§

impl DerefToPyAny for PyList

source§

impl DerefToPyAny for PyLong

source§

impl DerefToPyAny for PyMapping

source§

impl DerefToPyAny for PyMemoryView

source§

impl DerefToPyAny for PyModule

source§

impl DerefToPyAny for PyNone

source§

impl DerefToPyAny for PyNotImplemented

source§

impl DerefToPyAny for PySequence

source§

impl DerefToPyAny for PySet

source§

impl DerefToPyAny for PySlice

source§

impl DerefToPyAny for PyString

source§

impl DerefToPyAny for PySuper

source§

impl DerefToPyAny for PyTime

source§

impl DerefToPyAny for PyTraceback

source§

impl DerefToPyAny for PyTuple

source§

impl DerefToPyAny for PyType

source§

impl DerefToPyAny for PyTzInfo