[−][src]Struct bnf::Production
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 Expression
s
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 Expression
s
pub fn rhs_iter_mut(&mut self) -> IterMut
[src]
Get mutable iterator of the Production
's right hand side Expression
s
pub fn len(&self) -> usize
[src]
Get number of right hand side Expression
s
Trait Implementations
impl PartialEq<Production> for Production
[src]
fn eq(&self, other: &Production) -> bool
[src]
fn ne(&self, other: &Production) -> bool
[src]
impl Clone for Production
[src]
fn clone(&self) -> Production
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Production
[src]
impl Display for Production
[src]
impl Debug for Production
[src]
impl FromStr for Production
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for Production
[src]
Auto Trait Implementations
impl Send for Production
impl Unpin for Production
impl Sync for Production
impl UnwindSafe for Production
impl RefUnwindSafe for Production
Blanket Implementations
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,