Module html

Source
Expand description

HTML handling

Structs§

ComponentArguments
A component can take various arguments (to pass down to its children), which are then later compiled into Rust function arguments - for example
CssApiWrapper
Dom
The document model, similar to HTML. This is a create-only structure, you don’t actually read anything back
DynamicXmlComponent
Component that was created from a XML node (instead of being registered from Rust code). Necessary to
FilteredComponentArguments
HtmlExtractedConfig
Configuration options extracted from HTML meta tags
StyledDom
XmlComponent
XmlComponentMap
Holds all XML components - builtin components
XmlNode
Represents one XML node tag
XmlRenderOptions

Enums§

CompileError
Error that can happen from the translation from XML code to Rust code - stringified, since it is only used for printing and is not exposed in the public API
ComponentParseError
ImageTypeInfo
RenderDomError

Traits§

XmlComponentTrait
Specifies a component that reacts to a parsed XML node

Functions§

apply_html_config
Apply extracted configuration to the document and rendering options
clean_html_for_rendering
Clean up HTML by removing elements that can’t be rendered
inline_all_css
Process and inline all CSS in the document
new_dynxml_from_kuchiki
Create a DynamicXmlComponent from a kuchiki NodeRef
parse_component_nodes
Transform component nodes into
process_html_for_rendering
Main function to process HTML for rendering
register_components
Convert DynamicXmlComponents to XmlComponents and register them
to_pdf_ops
Converts the InlineText to a sequence of PDF operations for direct rendering

Type Aliases§

XmlTextContent
(Unparsed) text content of an XML node, such as the “Hello” in <button>Hello</button>.