pub struct SpanId(/* private fields */);Expand description
An interned Span.
Most tokens’ spans will never be inspected after lexing, so it’s better to make them small for memory saving reasons. This abstraction allows the library to optimize internal handling of spans over time.
This type is just a numeric ID; in order to do anything with it, you’ll
need to call one of the functions in Spanned.
Trait Implementations§
Source§impl Spanned for SpanId
impl Spanned for SpanId
Source§fn comments<'ctx>(&self, ctx: &'ctx Context) -> Comments<'ctx>
fn comments<'ctx>(&self, ctx: &'ctx Context) -> Comments<'ctx>
Forwards to
SpanId::comments().impl Copy for SpanId
Auto Trait Implementations§
impl Freeze for SpanId
impl RefUnwindSafe for SpanId
impl Send for SpanId
impl Sync for SpanId
impl Unpin for SpanId
impl UnwindSafe for SpanId
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