Struct pest_deconstruct::PestDeconstructor[][src]

pub struct PestDeconstructor<'i, R: RuleType> { /* fields omitted */ }

Deconstruct a Pest Pair into its inner productions in a strongly-typed, panic-enforced manner.

Panics on Drop if not exhausted. Use PestDeconstructor::discard if you mean to ignore productions.

Methods

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

Get the next production from this parse tree node.

Useful for Node productions.

Panics

If there are no remaining productions or the next one is for the wrong rule.

Get the next production from this parse tree node, if it is the correct rule.

Useful for Node? productions.

Get the next productions from this parse tree of a single rule type. If the next production is for a different rule, returns an empty vector.

Useful for Node* productions.

Get the next raw Pair of a certain rule type.

Panics

If there are no remaining productions or the next one is for the wrong rule.

Get the next raw Pair if it matches a certain rule.

Get the next raw Pairs while they match a certain rule.

Get the next production, if it exists.

This works without providing a concrete rule, unlike PestDeconstructor::next_pair.

Discard the remaining productions in this parse tree node.

Trait Implementations

impl<'i, R: Clone + RuleType> Clone for PestDeconstructor<'i, R>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'i, R: Debug + RuleType> Debug for PestDeconstructor<'i, R>
[src]

Formats the value using the given formatter. Read more

impl<'i, R: RuleType> Drop for PestDeconstructor<'i, R>
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'i, R> !Send for PestDeconstructor<'i, R>

impl<'i, R> !Sync for PestDeconstructor<'i, R>