Struct gll_pg_core::LogosToken
source · pub struct LogosToken<'a, T: Logos<'a>> {
pub kind: T,
pub slice: &'a str,
}
Expand description
A wrapper around Logos token type, providing its slice and kind.
Fields§
§kind: T
Token kind
slice: &'a str
Token slice
Trait Implementations§
source§impl<'a, T: Clone + Logos<'a>> Clone for LogosToken<'a, T>
impl<'a, T: Clone + Logos<'a>> Clone for LogosToken<'a, T>
source§fn clone(&self) -> LogosToken<'a, T>
fn clone(&self) -> LogosToken<'a, T>
Returns a copy 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 moresource§impl<'a, T: PartialEq + Logos<'a>> PartialEq for LogosToken<'a, T>
impl<'a, T: PartialEq + Logos<'a>> PartialEq for LogosToken<'a, T>
source§fn eq(&self, other: &LogosToken<'a, T>) -> bool
fn eq(&self, other: &LogosToken<'a, T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a, T: Eq + Logos<'a>> Eq for LogosToken<'a, T>
impl<'a, T: Logos<'a>> StructuralEq for LogosToken<'a, T>
impl<'a, T: Logos<'a>> StructuralPartialEq for LogosToken<'a, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for LogosToken<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for LogosToken<'a, T>where
T: Send,
impl<'a, T> Sync for LogosToken<'a, T>where
T: Sync,
impl<'a, T> Unpin for LogosToken<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for LogosToken<'a, T>where
T: 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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.