Struct bnf::Production
[−]
[src]
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]
fn new() -> Production
[src]
Construct a new Production
fn from_parts(t: Term, e: Vec<Expression>) -> Production
[src]
Construct an Production
from Expression
s
fn from_str(s: &str) -> Result<Self, Error>
[src]
fn add_to_rhs(&mut self, expr: Expression)
[src]
Add Expression
to the Production
's right hand side
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
.
fn rhs_iter(&self) -> Iter
[src]
Get iterator of the Production
's right hand side Expression
s
fn rhs_iter_mut(&mut self) -> IterMut
[src]
Get mutable iterator of the Production
's right hand side Expression
s
Trait Implementations
impl PartialEq for Production
[src]
fn eq(&self, __arg_0: &Production) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Production) -> bool
[src]
This method tests for !=
.
impl Debug for Production
[src]
impl Clone for Production
[src]
fn clone(&self) -> Production
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for Production
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more