pub enum Symbol<T, N> {
Terminal(T),
Nonterminal(N),
}
Expand description
A symbol in a context-free grammar.
Variants§
Trait Implementations§
Source§impl<T: Ord, N: Ord> Ord for Symbol<T, N>
impl<T: Ord, N: Ord> Ord for Symbol<T, N>
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<T: PartialOrd, N: PartialOrd> PartialOrd for Symbol<T, N>
impl<T: PartialOrd, N: PartialOrd> PartialOrd for Symbol<T, N>
impl<T: Eq, N: Eq> Eq for Symbol<T, N>
impl<T, N> StructuralPartialEq for Symbol<T, N>
Auto Trait Implementations§
impl<T, N> Freeze for Symbol<T, N>
impl<T, N> RefUnwindSafe for Symbol<T, N>where
T: RefUnwindSafe,
N: RefUnwindSafe,
impl<T, N> Send for Symbol<T, N>
impl<T, N> Sync for Symbol<T, N>
impl<T, N> Unpin for Symbol<T, N>
impl<T, N> UnwindSafe for Symbol<T, N>where
T: UnwindSafe,
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