leo_ast::common::node

Trait Node

Source
pub trait Node:
    Debug
    + Display
    + Clone
    + PartialEq
    + Eq
    + Serialize
    + DeserializeOwned {
    // Required methods
    fn span(&self) -> Span;
    fn set_span(&mut self, span: Span);
    fn id(&self) -> NodeID;
    fn set_id(&mut self, id: NodeID);
}
Expand description

A node in the AST.

Required Methods§

Source

fn span(&self) -> Span

Returns the span of the node.

Source

fn set_span(&mut self, span: Span)

Sets the span of the node.

Source

fn id(&self) -> NodeID

Returns the ID of the node.

Source

fn set_id(&mut self, id: NodeID)

Sets the ID of the node.

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§