Enum gutenberg_post_parser::ast::Node [−][src]
pub enum Node<'a> { Block { name: (Input<'a>, Input<'a>), attributes: Option<Input<'a>>, children: Vec<Node<'a>>, }, Phrase(Input<'a>), }
Represent a node in an AST.
Variants
Block
A block is the elementary component of the post format.
Fields of Block
name: (Input<'a>, Input<'a>) | The fully-qualified block name, where the left part of the pair represents the namespace, and the right part of the pair represents the block name. |
attributes: Option<Input<'a>> | A block can have attributes, just like an HTML element can have attributes. Attributes are encoded as a JSON string. |
children: Vec<Node<'a>> | A block can have inner blocks or phrases. |
Phrase(Input<'a>)
Anything that is not a block.
Trait Implementations
impl<'a> PartialEq for Node<'a>
[src]
impl<'a> PartialEq for Node<'a>
fn eq(&self, other: &Node<'a>) -> bool
[src]
fn eq(&self, other: &Node<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Node<'a>) -> bool
[src]
fn ne(&self, other: &Node<'a>) -> bool
This method tests for !=
.
impl<'a> Debug for Node<'a>
[src]
impl<'a> Debug for Node<'a>