[][src]Struct bnf::Production

pub struct Production {
    pub lhs: Term,
    // some fields omitted
}

A Production is comprised of any number of Expressions

Fields

lhs: Term

Methods

impl Production
[src]

pub fn new() -> Production
[src]

Construct a new Production

pub fn from_parts(t: Term, e: Vec<Expression>) -> Production
[src]

Construct an Production from Expressions

pub fn from_str(s: &str) -> Result<Self, Error>
[src]

pub fn add_to_rhs(&mut self, expr: Expression)
[src]

Add Expression to the Production's right hand side

pub fn remove_from_rhs(&mut self, expr: &Expression) -> Option<Expression>
[src]

Remove Expression from the Production's right hand side

If interested if Expression was removed, then inspect the returned Option.

pub fn rhs_iter(&self) -> Iter
[src]

Get iterator of the Production's right hand side Expressions

pub fn rhs_iter_mut(&mut self) -> IterMut
[src]

Get mutable iterator of the Production's right hand side Expressions

Trait Implementations

impl PartialEq<Production> for Production
[src]

impl Clone for Production
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Production
[src]

impl Display for Production
[src]

impl FromStr for Production
[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for Production

impl Sync for Production

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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