Skip to main content

GetSpan

Trait GetSpan 

Source
pub trait GetSpan {
    // Required method
    fn span(&self) -> &Span;
}
Expand description

Trait for getting the span of a node. For enums, this is useful for getting the span of the current variant, without having to match on each variant.

Required Methods§

Source

fn span(&self) -> &Span

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§