[][src]Struct pest_consume::Nodes

pub struct Nodes<'input, Rule: RuleType, Data> { /* fields omitted */ }

Iterator over Nodes. It is created by Node::children or Parser::parse.

Implementations

impl<'i, R: RuleType, D> Nodes<'i, R, D>[src]

pub fn error<S: ToString>(&self, message: S) -> Error<R>[src]

Create an error that points to the initial span of the nodes. Note that this span does not change as the iterator is consumed.

pub fn single(self) -> Result<Node<'i, R, D>, Error<R>>[src]

Returns the only element if there is only one element.

pub fn prec_climb<T, E, F1, F2>(
    self,
    climber: &PrecClimber<R>,
    primary: F1,
    infix: F2
) -> Result<T, E> where
    D: Clone,
    F1: FnMut(Node<'i, R, D>) -> Result<T, E>,
    F2: FnMut(T, Node<'i, R, D>, T) -> Result<T, E>, 
[src]

Performs the precedence climbing algorithm on the nodes.

pub fn user_data(&self) -> &D[src]

pub fn into_user_data(self) -> D[src]

pub fn as_pairs(&self) -> &Pairs<'i, R>[src]

pub fn into_pairs(self) -> Pairs<'i, R>[src]

Trait Implementations

impl<'input, Rule: Clone + RuleType, Data: Clone> Clone for Nodes<'input, Rule, Data>[src]

impl<'input, Rule: Debug + RuleType, Data: Debug> Debug for Nodes<'input, Rule, Data>[src]

impl<'i, R: RuleType, D> Display for Nodes<'i, R, D>[src]

impl<'i, R, D> DoubleEndedIterator for Nodes<'i, R, D> where
    R: RuleType,
    D: Clone
[src]

impl<'input, Rule: Eq + RuleType, Data: Eq> Eq for Nodes<'input, Rule, Data>[src]

impl<'input, Rule: Hash + RuleType, Data: Hash> Hash for Nodes<'input, Rule, Data>[src]

impl<'i, R, D> Iterator for Nodes<'i, R, D> where
    R: RuleType,
    D: Clone
[src]

type Item = Node<'i, R, D>

The type of the elements being iterated over.

impl<'input, Rule: PartialEq + RuleType, Data: PartialEq> PartialEq<Nodes<'input, Rule, Data>> for Nodes<'input, Rule, Data>[src]

impl<'input, Rule: RuleType, Data> StructuralEq for Nodes<'input, Rule, Data>[src]

impl<'input, Rule: RuleType, Data> StructuralPartialEq for Nodes<'input, Rule, Data>[src]

Auto Trait Implementations

impl<'input, Rule, Data> !RefUnwindSafe for Nodes<'input, Rule, Data>

impl<'input, Rule, Data> !Send for Nodes<'input, Rule, Data>

impl<'input, Rule, Data> !Sync for Nodes<'input, Rule, Data>

impl<'input, Rule, Data> Unpin for Nodes<'input, Rule, Data> where
    Data: Unpin

impl<'input, Rule, Data> UnwindSafe for Nodes<'input, Rule, Data> where
    Data: UnwindSafe,
    Rule: RefUnwindSafe

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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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