pub trait AstNode<M: AstInfo>: FromPairs<M> {
// Required methods
fn ast_info(&self) -> &M;
fn sort(&self) -> &'static str;
fn constructor(&self) -> &'static str;
// Provided methods
fn as_str<'a>(&'a self) -> &'a str
where M: SpannedAstInfo + 'a { ... }
fn traverse<F>(&self, _f: F)
where Self: Sized,
F: FnMut(&dyn AstNode<M>) { ... }
}Required Methods§
fn ast_info(&self) -> &M
fn sort(&self) -> &'static str
fn constructor(&self) -> &'static str
Provided Methods§
fn as_str<'a>(&'a self) -> &'a strwhere
M: SpannedAstInfo + 'a,
fn traverse<F>(&self, _f: F)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".