Module html2text Copy item path Source config Configure the HTML to text translation using the Config
type, which can be
constructed using one of the functions in this module. render Colour An RGB colour value RcDom The DOM itself; the result of parsing. RenderNode Common fields from a node. RenderTable A representation of a table render tree with metadata. RenderTableCell Render tree table cell RenderTableRow Render tree table row RenderTree The structure of an HTML document that can be rendered using a TextDecorator
. RenderedText A rendered HTML document. SizeEstimate Size information/estimate Error Errors from reading or rendering HTML NodeData The different kinds of nodes in the DOM. RenderNodeInfo The node-specific information distilled from the DOM. MIN_WIDTH The min width of the doc dom_to_render_tree Convert a DOM tree or subtree into a render tree. from_read Reads HTML from input
, and returns a String
with text wrapped to
width
columns. from_read_rich Reads HTML from input
, and returns text wrapped to width
columns.
The text is returned as a Vec<TaggedLine<_>>
; the annotations are vectors
of RichAnnotation
. The “outer” annotation comes first in the Vec
. from_read_with_decorator Reads HTML from input
, decorates it using decorator
, and
returns a String
with text wrapped to width
columns. parse Reads and parses HTML from input
and prepares a render tree.