pub enum Trivia {
Spaces(SmolStr),
Comment(Comment),
}Expand description
Trivia that can be before and after a token.
Variants§
Spaces(SmolStr)
Spaces, be it whitespace, tabs, new lines, etc.
Comment(Comment)
Comment, single or multi line.
Trait Implementations§
Source§impl Ord for Trivia
impl Ord for Trivia
Source§impl PartialOrd for Trivia
impl PartialOrd for Trivia
Source§impl Print for Trivia
impl Print for Trivia
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 Trivia
impl StructuralPartialEq for Trivia
Auto Trait Implementations§
impl Freeze for Trivia
impl RefUnwindSafe for Trivia
impl Send for Trivia
impl Sync for Trivia
impl Unpin for Trivia
impl UnwindSafe for Trivia
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