pub struct EndOfFile(/* private fields */);Expand description
The EndOfFile token.
This token is always the last token in a file. It’ll only really be useful
if a file has no code but only comments - the comments will be stored in
token.leading_trivia and there’s no other way
to detect such comments.
Trait Implementations§
Source§impl Ord for EndOfFile
impl Ord for EndOfFile
Source§impl PartialOrd for EndOfFile
impl PartialOrd for EndOfFile
Source§impl Print for EndOfFile
impl Print for EndOfFile
Source§fn print_final_trivia(&self) -> String
fn print_final_trivia(&self) -> String
Prints only the very final trivia. Used for the default implementation of
Print::print, which just joins Print::print_without_final_trivia
and this function.Source§fn print_without_final_trivia(&self) -> String
fn print_without_final_trivia(&self) -> String
Prints the whole token including all surrounding trivia, excluding the
very last trailing trivia.
impl Eq for EndOfFile
impl StructuralPartialEq for EndOfFile
Auto Trait Implementations§
impl Freeze for EndOfFile
impl RefUnwindSafe for EndOfFile
impl Send for EndOfFile
impl Sync for EndOfFile
impl Unpin for EndOfFile
impl UnwindSafe for EndOfFile
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