pub trait AstVisitable: Clone {
// Required method
fn accept(&self, visitor: &mut dyn AstVisitor);
// Provided method
fn clone_box(&self) -> Box<Self>
where Self: Sized { ... }
}
Expand description
Trait for all AST nodes.
Required Methods§
Sourcefn accept(&self, visitor: &mut dyn AstVisitor)
fn accept(&self, visitor: &mut dyn AstVisitor)
Accepts a visitor for the AST node.
Provided Methods§
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.