[][src]Struct branchy::Rule

pub struct Rule<Nt, T> {
    pub pattern: Nt,
    pub replacement: Vec<Symbol<Nt, T>>,
}

Describes a rule (or production) of a context-free grammar.

Fields

pattern: Nt

Left-hand side of the rule (a single non-terminal symbol value).

replacement: Vec<Symbol<Nt, T>>

Right-hand side of the rule (any sequence of symbols, with which to replace the encountered pattern).

Methods

impl<Nt, T> Rule<Nt, T>[src]

pub fn new(pattern: Nt, replacement: Vec<Symbol<Nt, T>>) -> Self[src]

Trait Implementations

impl<Nt: Clone, T: Clone> Clone for Rule<Nt, T>[src]

impl<Nt: Debug, T: Debug> Debug for Rule<Nt, T>[src]

impl<Nt: PartialEq, T: PartialEq> PartialEq<Rule<Nt, T>> for Rule<Nt, T>[src]

impl<Nt, T> StructuralPartialEq for Rule<Nt, T>[src]

Auto Trait Implementations

impl<Nt, T> RefUnwindSafe for Rule<Nt, T> where
    Nt: RefUnwindSafe,
    T: RefUnwindSafe

impl<Nt, T> Send for Rule<Nt, T> where
    Nt: Send,
    T: Send

impl<Nt, T> Sync for Rule<Nt, T> where
    Nt: Sync,
    T: Sync

impl<Nt, T> Unpin for Rule<Nt, T> where
    Nt: Unpin,
    T: Unpin

impl<Nt, T> UnwindSafe for Rule<Nt, T> where
    Nt: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,