Struct peel::Peel [] [src]

pub struct Peel<R, V> {
    pub arena: Arena<ParserBox<R, V>>,
    pub root: Option<NodeId>,
}

The main peeling structure

Fields

The memory arena of the tree

The first node added will be the root

Methods

impl<R, V> Peel<R, V> where V: Display
[src]

Create a new empty Peel instance

Set the global log level for reporting

Create a new boxed Parser and return a corresponding Node

Append the second node to the first one within the current tree structure

Create a new parser and link it with the provided node

Convenient function for recursive traversal with the root as starting point

Errors

When no tree root was found or the first parser already fails.

Do parsing until all possible paths failed. This is equivalent in finding the deepest possible parsing result within the tree. The result will be assembled together in the given result vector, which will be returned at the end.

Errors

When the first parser already fails.

Display an error from a parser

Trait Implementations

impl<K, V> Display for Peel<K, V> where V: Display
[src]

Formats the value using the given formatter.