[−][src]Enum branchy::Symbol
Used to describe non-terminal and terminal symbols in Rule
s
and grammar input sequences for Expander::expand()
.
Variants
Variant for non-terminal symbols - ones which can be further expanded, can appear on left-hand side of rules and cannot appear in a successful expansion result.
Variant for terminal symbols - ones which will not be replaced during expansion, cannot appear on left-hand side of rules and will be the only ones in a successful expansion result.
Methods
impl<Nt, T> Symbol<Nt, T>
[src]
pub fn is_terminal(&self) -> bool
[src]
pub fn is_nonterminal(&self) -> bool
[src]
pub fn unwrap_nonterm(self) -> Nt
[src]
pub fn expect_nonterm(self, message: &'static str) -> Nt
[src]
pub fn unwrap_term(self) -> T
[src]
pub fn expect_term(self, message: &'static str) -> T
[src]
Trait Implementations
impl<Nt: Clone, T: Clone> Clone for Symbol<Nt, T>
[src]
impl<Nt: Copy, T: Copy> Copy for Symbol<Nt, T>
[src]
impl<Nt: Debug, T: Debug> Debug for Symbol<Nt, T>
[src]
impl<Nt: PartialEq, T: PartialEq> PartialEq<Symbol<Nt, T>> for Symbol<Nt, T>
[src]
impl<Nt, T> StructuralPartialEq for Symbol<Nt, T>
[src]
Auto Trait Implementations
impl<Nt, T> RefUnwindSafe for Symbol<Nt, T> where
Nt: RefUnwindSafe,
T: RefUnwindSafe,
Nt: RefUnwindSafe,
T: RefUnwindSafe,
impl<Nt, T> Send for Symbol<Nt, T> where
Nt: Send,
T: Send,
Nt: Send,
T: Send,
impl<Nt, T> Sync for Symbol<Nt, T> where
Nt: Sync,
T: Sync,
Nt: Sync,
T: Sync,
impl<Nt, T> Unpin for Symbol<Nt, T> where
Nt: Unpin,
T: Unpin,
Nt: Unpin,
T: Unpin,
impl<Nt, T> UnwindSafe for Symbol<Nt, T> where
Nt: UnwindSafe,
T: UnwindSafe,
Nt: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,