[][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

Implementations

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 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

pub fn len(&self) -> usize[src]

Get number of right hand side Expressions

pub fn is_empty(&self) -> bool[src]

Trait Implementations

impl Clone for Production[src]

impl Debug for Production[src]

impl Default for Production[src]

impl<'de> Deserialize<'de> for Production[src]

impl Display for Production[src]

impl Eq for Production[src]

impl FromStr for Production[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for Production[src]

impl PartialEq<Production> for Production[src]

impl Serialize for Production[src]

impl StructuralEq for Production[src]

impl StructuralPartialEq for Production[src]

Auto Trait Implementations

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> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> TryConv for T

impl<T> TryConv for T

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>,