document_tree
Part of the rst
crate family.
This crate contains structs and traits mirroring Docutils’ Document Tree model.
The basic structure is a tree of elements, some of which have children and/or extra attributes.
use *;
use ;
Check out the other crates in the family on how to create one from rST markup or render it!
The advantages of this approach are that it’s convenient to have the children interface, as well as to trivially map elements to XML. The disadvantage is that a “vector of children” is not a well-defined model for the more structured elements like e.g. a section, which always contains a title followed by blocks.