[][src]Type Definition comrak::nodes::AstNode

type AstNode<'a> = Node<'a, RefCell<Ast>>;

The type of a node within the document.

It is bound by the lifetime 'a, which corresponds to the Arena nodes are allocated in. AstNodes are almost handled as a reference itself bound by 'a. Child Asts are wrapped in RefCell for interior mutability.

You can construct a new AstNode from a NodeValue using the From trait:

let root = AstNode::from(NodeValue::Document);

Trait Implementations

impl<'a> From<NodeValue> for AstNode<'a>[src]

fn from(value: NodeValue) -> Self[src]

Create a new AST node with the given value.