Skip to main content

MaybeTraverse

Trait MaybeTraverse 

Source
pub trait MaybeTraverse {
    const HAS_TRAVERSE: bool = false;
    const HAS_CLEAR: bool = false;

    // Required method
    fn try_traverse(&self, traverse_fn: &mut TraverseFn<'_>);

    // Provided method
    fn try_clear(&mut self, _out: &mut Vec<PyObjectRef>) { ... }
}
Expand description

This trait is used as a “Optional Trait”(I ’d like to use Trace? but it’s not allowed yet) for PyObjectPayload type

impl for PyObjectPayload, pyclass proc macro will handle the actual dispatch if type impl Trace Every PyObjectPayload impl MaybeTrace, which may or may not be traceable

Provided Associated Constants§

Source

const HAS_TRAVERSE: bool = false

if is traceable, will be used by vtable to determine

Source

const HAS_CLEAR: bool = false

if has clear implementation for circular reference resolution (tp_clear)

Required Methods§

Source

fn try_traverse(&self, traverse_fn: &mut TraverseFn<'_>)

Provided Methods§

Source

fn try_clear(&mut self, _out: &mut Vec<PyObjectRef>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl MaybeTraverse for PyArithmeticError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyAssertionError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyAsyncGen

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyAttributeError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyBaseException

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyBaseExceptionGroup

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyBaseObject

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyBlockingIOError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyBool

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyBoundMethod

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyBrokenPipeError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyBufferError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyByteArray

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyBytes

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyBytesWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyCallableIterator

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyCapsule

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyChildProcessError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyClassMethod

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyCode

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyComplex

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyConnectionAbortedError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyConnectionError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyConnectionRefusedError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyConnectionResetError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyCoroutine

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyDeprecationWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyDict

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyEOFError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyEllipsis

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyEncodingWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyEnumerate

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyException

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyFileExistsError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyFileNotFoundError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyFilter

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyFloat

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyFloatingPointError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyFrozenSet

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyFunction

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyFutureWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyGenerator

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyGeneratorExit

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyGenericAlias

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyGetSet

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyImportError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyImportWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyIncompleteInputError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyIndentationError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyIndexError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyInt

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyInterpolation

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyInterruptedError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyIsADirectoryError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyKeyError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyKeyboardInterrupt

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyList

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyLookupError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyMap

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyMappingProxy

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyMemoryError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyMemoryView

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyModule

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyModuleDef

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyModuleNotFoundError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyNameError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyNamespace

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyNone

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyNotADirectoryError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyNotImplemented

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyNotImplementedError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyOSError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyOverflowError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyPendingDeprecationWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyPermissionError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyProcessLookupError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyProperty

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyPythonFinalizationError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyRange

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyRecursionError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyReferenceError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyResourceWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyRuntimeError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyRuntimeWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PySequenceIterator

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PySet

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PySlice

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyStaticMethod

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyStopAsyncIteration

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyStopIteration

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyStr

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PySuper

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PySyntaxError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PySyntaxWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PySystemError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PySystemExit

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyTabError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyTemplate

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyTemplateIter

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyTimeoutError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyTraceback

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyTuple

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyType

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyTypeError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyUnboundLocalError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyUnicodeDecodeError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyUnicodeEncodeError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyUnicodeError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyUnicodeTranslateError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyUnicodeWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyUnion

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyUserWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyUtf8Str

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyValueError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyWarning

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyWeak

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyWeakProxy

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for PyZeroDivisionError

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for PyZip

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for Frame

Source§

const HAS_TRAVERSE: bool = true

Source§

const HAS_CLEAR: bool = true

Source§

impl MaybeTraverse for HeapMethodDef

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for VecBuffer

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for Generic

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for NoDefault

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for ParamSpec

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for ParamSpecArgs

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for ParamSpecKwargs

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for TypeVar

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false

Source§

impl MaybeTraverse for TypeVarTuple

Source§

const HAS_TRAVERSE: bool = false

Source§

const HAS_CLEAR: bool = false