pub enum TerminalSymbol<Term> {
Term(Term),
Error,
Eof,
}Expand description
A type for terminal symbols in the grammar.
just because we have to take care of the error token specially,
and future support for other special tokens.
Variants§
Implementations§
Trait Implementations§
Source§impl<Term> Clone for TerminalSymbol<Term>where
Term: Clone,
impl<Term> Clone for TerminalSymbol<Term>where
Term: Clone,
Source§fn clone(&self) -> TerminalSymbol<Term>
fn clone(&self) -> TerminalSymbol<Term>
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 moreSource§impl<Term> Debug for TerminalSymbol<Term>where
Term: Debug,
impl<Term> Debug for TerminalSymbol<Term>where
Term: Debug,
Source§impl<Term> Display for TerminalSymbol<Term>where
Term: Display,
impl<Term> Display for TerminalSymbol<Term>where
Term: Display,
Source§impl<Term> Hash for TerminalSymbol<Term>where
Term: Hash,
impl<Term> Hash for TerminalSymbol<Term>where
Term: Hash,
Source§impl<Term> Ord for TerminalSymbol<Term>where
Term: Ord,
impl<Term> Ord for TerminalSymbol<Term>where
Term: Ord,
Source§fn cmp(&self, other: &TerminalSymbol<Term>) -> Ordering
fn cmp(&self, other: &TerminalSymbol<Term>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Term> PartialEq for TerminalSymbol<Term>where
Term: PartialEq,
impl<Term> PartialEq for TerminalSymbol<Term>where
Term: PartialEq,
Source§impl<Term> PartialOrd for TerminalSymbol<Term>where
Term: PartialOrd,
impl<Term> PartialOrd for TerminalSymbol<Term>where
Term: PartialOrd,
impl<Term> Copy for TerminalSymbol<Term>where
Term: Copy,
impl<Term> Eq for TerminalSymbol<Term>where
Term: Eq,
impl<Term> StructuralPartialEq for TerminalSymbol<Term>
Auto Trait Implementations§
impl<Term> Freeze for TerminalSymbol<Term>where
Term: Freeze,
impl<Term> RefUnwindSafe for TerminalSymbol<Term>where
Term: RefUnwindSafe,
impl<Term> Send for TerminalSymbol<Term>where
Term: Send,
impl<Term> Sync for TerminalSymbol<Term>where
Term: Sync,
impl<Term> Unpin for TerminalSymbol<Term>where
Term: Unpin,
impl<Term> UnwindSafe for TerminalSymbol<Term>where
Term: 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