Struct passerine::common::span::Spanned [−][src]
pub struct Spanned<T> {
pub item: T,
pub span: Span,
}
Expand description
A wrapper for spanning types. For example, a token, such as
pub enum Token {
Number(f64),
Open,
Close,
}
or the like, can be spanned to indicate where it was parsed from (a Spanned<Token>
).
Fields
item: T
span: Span
Implementations
Takes a generic item, and wraps in in a Span
to make it Spanned
.
Joins a Vector of spanned items into a single span.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Spanned<T>
impl<T> UnwindSafe for Spanned<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more