pyo3::types

Trait 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 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 PyEncodingWarning

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

Source§

impl DerefToPyAny for PyWeakref

Source§

impl DerefToPyAny for PyWeakrefProxy

Source§

impl DerefToPyAny for PyWeakrefReference