pub struct Token<N> {
pub name: N,
pub str: String,
pub pos: TextPosition,
}Expand description
A specific occurence of a token in the text that was tokenized.
Contains the name of the token type, str, a String that contains the
text the token matched, and pos, the TextPosition of the token in the text.
Fieldsยง
ยงname: Nยงstr: Stringยงpos: TextPositionImplementationsยง
Trait Implementationsยง
impl<N: Eq> Eq for Token<N>
impl<N> StructuralPartialEq for Token<N>
Auto Trait Implementationsยง
impl<N> Freeze for Token<N>where
N: Freeze,
impl<N> RefUnwindSafe for Token<N>where
N: RefUnwindSafe,
impl<N> Send for Token<N>where
N: Send,
impl<N> Sync for Token<N>where
N: Sync,
impl<N> Unpin for Token<N>where
N: Unpin,
impl<N> UnwindSafe for Token<N>where
N: 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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.