pub struct Spanned<T> {
pub value: T,
pub span: (usize, usize),
}
Expand description
A wrapper around a value that also contains the span of the value in the source.
The underlying parsed node.
The span of the node in the source. The first value is the inclusive start
of the span, and the second value is the exclusive end of the span.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
The resulting type after dereferencing.
Dereferences the value.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.