[][src]Struct pest_consume::Node

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

A node of the parse tree.

Implementations

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

pub fn as_str(&self) -> &'i str[src]

pub fn as_span(&self) -> Span<'i>[src]

pub fn as_rule(&self) -> R[src]

pub fn into_children(self) -> Nodes<'i, R, D>

Notable traits for Nodes<'i, R, D>

impl<'i, R, D> Iterator for Nodes<'i, R, D> where
    R: RuleType,
    D: Clone
type Item = Node<'i, R, D>;
[src]

Returns an iterator over the children of this node

pub fn children(&self) -> Nodes<'i, R, D>

Notable traits for Nodes<'i, R, D>

impl<'i, R, D> Iterator for Nodes<'i, R, D> where
    R: RuleType,
    D: Clone
type Item = Node<'i, R, D>;
where
    D: Clone
[src]

Returns an iterator over the children of this node

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

Create an error that points to the span of the node.

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

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

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

pub fn into_pair(self) -> Pair<'i, R>[src]

Trait Implementations

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

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

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

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

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

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

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

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

Auto Trait Implementations

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

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

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

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

impl<'input, Rule, Data> UnwindSafe for Node<'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<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.