gbf_core::decompiler::ast

Trait AstVisitable

Source
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§

Source

fn accept(&self, visitor: &mut dyn AstVisitor)

Accepts a visitor for the AST node.

Provided Methods§

Source

fn clone_box(&self) -> Box<Self>
where Self: Sized,

Clones the AST node as a boxed trait object.

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.

Implementors§