pub struct UnitSpan {
pub cooked: SourceRange,
pub file: u32,
pub written: SourceRange,
}Expand description
One token’s place in a unit’s rendering, and where it came from.
Fields§
§cooked: SourceRangeWhere the spelling is in RenderedUnit::text.
file: u32Which file of RenderedUnit::files the token stands in.
written: SourceRangeThe place in that file a consumer should act on.
The token’s own range for a token the file wrote, and the outermost call site for one that came out of
a macro body — the text the reader can see, rather than a line inside a #define three headers up. See
ExpandedToken::diagnostic_range, which is where that choice is documented.
Trait Implementations§
impl Eq for UnitSpan
impl StructuralPartialEq for UnitSpan
Auto Trait Implementations§
impl Forget for UnitSpan
impl Freeze for UnitSpan
impl Move for UnitSpan
impl RefUnwindSafe for UnitSpan
impl Send for UnitSpan
impl Sync for UnitSpan
impl Unpin for UnitSpan
impl UnsafeUnpin for UnitSpan
impl UnwindSafe for UnitSpan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more