pub trait MaybeTraverse {
const IS_TRACE: bool = false;
// Required method
fn try_traverse(&self, traverse_fn: &mut TraverseFn<'_>);
}
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§
Required Methods§
fn try_traverse(&self, traverse_fn: &mut TraverseFn<'_>)
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.