DocPrinter

Simple Document printer, with support for serialization caching where the latter avoids having to generate unchanged sub-trees

Members

Aliases

Doc
alias Doc = Document!(T)
Undocumented in source.
Node
alias Node = Doc.Node
Undocumented in source.

Functions

cache
DocPrinter cache(bool yes)

Enable or disable use of cached document snippets. These represent document branches that remain unaltered, and can be emitted verbatim instead of traversing the tree

indent
DocPrinter indent(uint indentation)

Sets the number of spaces used when increasing indentation levels. Use a value of zero to disable explicit formatting

print
T[] print(Doc doc, T[] content)

Generate a text representation of the document tree

print
void print(Doc doc, OutputStream stream)

Generate a text representation of the document tree

print
void print(Node root, void delegate(const(T)[][]...) emit)

Generate a representation of the given node-subtree

Meta