pub struct TriviaPiece<'a, K = BuiltinKind> {
pub kind: K,
pub text: &'a str,
}Expand description
A trivia piece classified by the user’s token type.
K is the user’s kind enum, defaulting to BuiltinKind for the
line/block-only common case.
Fields§
§kind: K§text: &'a strTrait Implementations§
Source§impl<'a, K: Clone> Clone for TriviaPiece<'a, K>
impl<'a, K: Clone> Clone for TriviaPiece<'a, K>
Source§fn clone(&self) -> TriviaPiece<'a, K>
fn clone(&self) -> TriviaPiece<'a, K>
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 moreimpl<'a, K: Copy> Copy for TriviaPiece<'a, K>
Auto Trait Implementations§
impl<'a, K> Freeze for TriviaPiece<'a, K>where
K: Freeze,
impl<'a, K> RefUnwindSafe for TriviaPiece<'a, K>where
K: RefUnwindSafe,
impl<'a, K> Send for TriviaPiece<'a, K>where
K: Send,
impl<'a, K> Sync for TriviaPiece<'a, K>where
K: Sync,
impl<'a, K> Unpin for TriviaPiece<'a, K>where
K: Unpin,
impl<'a, K> UnsafeUnpin for TriviaPiece<'a, K>where
K: UnsafeUnpin,
impl<'a, K> UnwindSafe for TriviaPiece<'a, 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