pub struct TokenTrivia<K: TokenKind> {
pub kind: K,
pub span: Span,
pub text: String,
}Expand description
Piece of trivia (comment/whitespace) attached to a token.
Fields§
§kind: KKind of the trivia token.
span: SpanSpan covered by the trivia.
text: StringRaw textual representation.
Implementations§
Source§impl<K: TokenKind> TokenTrivia<K>
impl<K: TokenKind> TokenTrivia<K>
Trait Implementations§
Source§impl<K: Clone + TokenKind> Clone for TokenTrivia<K>
impl<K: Clone + TokenKind> Clone for TokenTrivia<K>
Source§fn clone(&self) -> TokenTrivia<K>
fn clone(&self) -> TokenTrivia<K>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<K> Freeze for TokenTrivia<K>where
K: Freeze,
impl<K> RefUnwindSafe for TokenTrivia<K>where
K: RefUnwindSafe,
impl<K> Send for TokenTrivia<K>
impl<K> Sync for TokenTrivia<K>
impl<K> Unpin for TokenTrivia<K>where
K: Unpin,
impl<K> UnwindSafe for TokenTrivia<K>where
K: UnwindSafe,
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