pub enum TriviaKind {
Whitespace,
Newline,
Comment,
}Expand description
The kind of a trivia piece.
Variants§
Whitespace
Horizontal whitespace (spaces / tabs) within a line.
Newline
A line-feed (\n) or carriage-return + line-feed (\r\n).
Comment
A -- comment (including the -- prefix and everything to EOL,
but not the newline itself).
Trait Implementations§
Source§impl Clone for TriviaKind
impl Clone for TriviaKind
Source§fn clone(&self) -> TriviaKind
fn clone(&self) -> TriviaKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TriviaKind
impl Debug for TriviaKind
Source§impl PartialEq for TriviaKind
impl PartialEq for TriviaKind
Source§fn eq(&self, other: &TriviaKind) -> bool
fn eq(&self, other: &TriviaKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TriviaKind
impl Eq for TriviaKind
impl StructuralPartialEq for TriviaKind
Auto Trait Implementations§
impl Freeze for TriviaKind
impl RefUnwindSafe for TriviaKind
impl Send for TriviaKind
impl Sync for TriviaKind
impl Unpin for TriviaKind
impl UnsafeUnpin for TriviaKind
impl UnwindSafe for TriviaKind
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