pub trait PyClassTraverse<T> {
// Required method
fn __traverse__(
self,
this: &T,
visit: PyVisit<'_>,
) -> Result<(), PyTraverseError>;
}Expand description
Autoref specialization point for __traverse__ implementations.
Type parameter T is necessary to make the trait local to the implementing crate.
Required Methods§
Sourcefn __traverse__(
self,
this: &T,
visit: PyVisit<'_>,
) -> Result<(), PyTraverseError>
fn __traverse__( self, this: &T, visit: PyVisit<'_>, ) -> Result<(), PyTraverseError>
self is used for autoref specialization of PyClassImplCollector and &PyClassImplCollector.
this is the instance of the class being traversed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T> PyClassTraverse<T> for &PyClassImplCollector<T>
Fallback implementation for types without a __traverse__ pymethod.