pub trait AstNode {
// Required methods
fn can_cast(kind: Token) -> bool
where Self: Sized;
fn cast(syntax: SyntaxNode) -> Option<Self>
where Self: Sized;
fn expect(syntax: SyntaxNode) -> Self
where Self: Sized;
fn syntax(&self) -> &SyntaxNode;
// Provided methods
fn clone_for_update(&self) -> Self
where Self: Sized { ... }
fn clone_subtree(&self) -> Self
where Self: Sized { ... }
}