pub trait Visitable: Normalize + Validate {
// Provided methods
fn type_identity(&self) -> &'static str { ... }
fn drive(&self, _: &mut dyn VisitorCore) { ... }
fn drive_mut(&mut self, _: &mut dyn VisitorMutCore) { ... }
}Expand description
A node that participates in visitor-based traversal.
Invariants:
- Traversal is owned by the visitor, not by normalize/validate hooks.
drive/drive_mutdescribe structure only.- No validation or normalization logic lives here.
Provided Methods§
Sourcefn type_identity(&self) -> &'static str
fn type_identity(&self) -> &'static str
Return the concrete Rust application-value type used for callback diagnostics.
fn drive(&self, _: &mut dyn VisitorCore)
fn drive_mut(&mut self, _: &mut dyn VisitorMutCore)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".