pub struct Eof<'lex> { /* private fields */ }
Expand description
A special token for the end of a file.
The main purpose of this token is to hold any comment spans that are after
all the “real” tokens. For example, a file consisting of only comments will
have a single Eof
token after lexing, and will include all of those
comments within.
Trait Implementations§
source§impl Spanned for Eof<'_>
impl Spanned for Eof<'_>
source§fn comments<'ctx>(&self, ctx: &'ctx Context) -> Comments<'ctx>
fn comments<'ctx>(&self, ctx: &'ctx Context) -> Comments<'ctx>
Forwards to
SpanId::comments()
.impl<'lex> Copy for Eof<'lex>
Auto Trait Implementations§
impl<'lex> Freeze for Eof<'lex>
impl<'lex> RefUnwindSafe for Eof<'lex>
impl<'lex> Send for Eof<'lex>
impl<'lex> Sync for Eof<'lex>
impl<'lex> Unpin for Eof<'lex>
impl<'lex> UnwindSafe for Eof<'lex>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)