pub trait AstPositionExt: Sized {
// Provided methods
fn default_position(self) -> Positioned<Self> { ... }
fn with_position(self, pos: Pos) -> Positioned<Self> { ... }
}
Expand description
Extension trait for adding position information to AST nodes.
Provided Methods§
Sourcefn default_position(self) -> Positioned<Self>
fn default_position(self) -> Positioned<Self>
Create a positioned version of this AST node with the default position (0:0).
Sourcefn with_position(self, pos: Pos) -> Positioned<Self>
fn with_position(self, pos: Pos) -> Positioned<Self>
Create a positioned version of this AST node with the given 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.