brane_dsl::ast

Trait Node

Source
pub trait Node: Clone + Debug {
    // Required method
    fn range(&self) -> &TextRange;

    // Provided methods
    fn start(&self) -> &TextPos { ... }
    fn end(&self) -> &TextPos { ... }
}
Expand description

Defines a general AST node.

Required Methods§

Source

fn range(&self) -> &TextRange

Returns the node’s source range.

Provided Methods§

Source

fn start(&self) -> &TextPos

Returns the node’s start position.

Source

fn end(&self) -> &TextPos

Returns the node’s end position.

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§