pub trait Located {
// Required method
fn span(&self) -> Option<Span>;
}Expand description
Types that track a Span.
Located is a small trait to get a Span from types that track span information. The Span is returned in an Option because even types that track spans very precisely may not have such information available in the first place, probably when constructed by hand instead of being parsed.
Located can be automatically derived (see the corresponding proc-macro for details).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".