Struct lrlex::DefaultLexeme
source · pub struct DefaultLexeme<StorageT: Debug = u32> { /* private fields */ }
Expand description
lrlex’s standard lexeme struct, provided as a convenience.
Trait Implementations§
source§impl<StorageT: Clone + Debug> Clone for DefaultLexeme<StorageT>
impl<StorageT: Clone + Debug> Clone for DefaultLexeme<StorageT>
source§fn clone(&self) -> DefaultLexeme<StorageT>
fn clone(&self) -> DefaultLexeme<StorageT>
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<StorageT: Copy + Debug + Eq + Hash + Copy> Error for DefaultLexeme<StorageT>
impl<StorageT: Copy + Debug + Eq + Hash + Copy> Error for DefaultLexeme<StorageT>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<StorageT: Copy + Debug + Hash + Eq> Lexeme<StorageT> for DefaultLexeme<StorageT>
impl<StorageT: Copy + Debug + Hash + Eq> Lexeme<StorageT> for DefaultLexeme<StorageT>
source§fn new(tok_id: StorageT, start: usize, len: usize) -> Self
fn new(tok_id: StorageT, start: usize, len: usize) -> Self
Create a new lexeme with ID
tok_id
, a starting position in the input start
, and length
len
. Read moresource§fn new_faulty(tok_id: StorageT, start: usize, len: usize) -> Self
fn new_faulty(tok_id: StorageT, start: usize, len: usize) -> Self
Create a new faulty lexeme with ID
tok_id
and a starting position in the input start
.impl<StorageT: Copy + Debug> Copy for DefaultLexeme<StorageT>
impl<StorageT: Eq + Debug> Eq for DefaultLexeme<StorageT>
impl<StorageT: Debug> StructuralPartialEq for DefaultLexeme<StorageT>
Auto Trait Implementations§
impl<StorageT> Freeze for DefaultLexeme<StorageT>where
StorageT: Freeze,
impl<StorageT> RefUnwindSafe for DefaultLexeme<StorageT>where
StorageT: RefUnwindSafe,
impl<StorageT> Send for DefaultLexeme<StorageT>where
StorageT: Send,
impl<StorageT> Sync for DefaultLexeme<StorageT>where
StorageT: Sync,
impl<StorageT> Unpin for DefaultLexeme<StorageT>where
StorageT: Unpin,
impl<StorageT> UnwindSafe for DefaultLexeme<StorageT>where
StorageT: 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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.