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>) { ... }
}