pub trait WrappingSpan<T>: Span {
type Spanned;
// Required methods
fn make_wrapped(self, inner: T) -> Self::Spanned;
fn inner_of(spanned: &Self::Spanned) -> &T;
fn span_of(spanned: &Self::Spanned) -> &Self;
}Expand description
A supertrait of Span that specifies how a value, usually an AST node, might have a span attached to it.
The type for which this trait is implemented is the span type, and the T is the value type.
Required Associated Types§
Required Methods§
Sourcefn make_wrapped(self, inner: T) -> Self::Spanned
fn make_wrapped(self, inner: T) -> Self::Spanned
Wrap a node in a span.
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.