Struct inlined_parser::Node [] [src]

pub struct Node<'a> {
    pub name: &'static str,
    pub start: usize,
    pub end: usize,
    pub contents: NodeContents<'a>,
}

Fields

The name of the node.

The (inclusive) start index of the range this node matches. It's the byte (NOT char) offset of the parse input.

The (exclusive) end index of the range this node matches. It's the byte (NOT char) offset of the parse input.

The contents of the node; this can be either children nodes or a matched &[u8] slice.

Methods

impl<'a> Node<'a>
[src]

The node name if set, or "" if unset.

Creates a Node with an empty name.

Creates a Node with the provided name and makes it a parent of the provided children.

Traverses the tree rooted at the node with pre-order traversal. Includes the self node as the first node.

Concatenates and returns all &[u8] data in the leaf nodes beneath the current node.

Trait Implementations

impl<'a> PartialEq for Node<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Debug for Node<'a>
[src]

Formats the value using the given formatter.