[−][src]Module azulc::xml
XML-based DOM serialization and XML-to-Rust compiler implementation
Structs
BodyRenderer | Render for a |
ComponentArguments | A component can take various arguments (to pass down to its children), which are then later compiled into Rust function arguments - for example |
DivRenderer | Render for a |
DomXml | Wrapper for the XML parser - necessary to easily create a Dom from
XML without putting an XML solver into |
DynamicXmlComponent | Component that was created from a XML node (instead of being registered from Rust code). Necessary to |
TextPos | Position in text. |
TextRenderer | Render for a |
XmlComponentMap | Holds all XML components - builtin components |
XmlNode | Represents one XML node tag |
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 | |
DynamicItem | Item of a split string - either a variable name or a string |
LoadStyleFileError | Error that can happen while a CSS file is being loaded from an XML file |
RenderDomError | |
StreamError | A stream parser errors. |
TokenType | List of token types. |
XmlError | An XML parser errors. |
XmlParseError |
Constants
DEFAULT_ARGS |
Traits
XmlComponent | Specifies a component that reacts to a parsed XML node |
Functions
cascade_dom | |
combine_and_replace_dynamic_items | Combines the split string back into its original form while replacing the variables with their values |
compile_body_node_to_rust_code | |
compile_component | |
compile_components | |
compile_components_to_rust_code | Takes all components and generates the source code function from them |
compile_node_to_rust_code_inner | |
find_attribute | |
find_node_by_type | Searches in the the |
format_args_dynamic | Given a string and a key => value mapping, replaces parts of the string with the value, i.e.: |
format_component_args | |
get_body_node | Find the one and only |
get_item | Given a root node, traverses along the hierarchy, and returns a mutable reference to the last child node of the root node |
get_xml_components | Filter all |
layout_dom | |
load_style_file_from_xml | Tries to look for a |
normalize_casing | Normalizes input such as |
parse_bool | Parses a string ("true" or "false") |
parse_component_arguments | Compiles a XML |
parse_xml_string | Parses the XML string into an XML tree, returns
the root |
prepare_string | |
render_component_inner | |
render_dom_from_body_node | |
render_dom_from_body_node_inner | Takes a single (expanded) app node and renders the DOM or returns an error |
set_attributes | |
set_stringified_attributes | |
split_dynamic_string | Splits a string into formatting arguments |
str_to_dom | Parses an XML string and returns a |
str_to_rust_code | Parses an XML string and returns a |
validate_and_filter_component_args | Filters the XML attributes of a component given XmlAttributeMap |
Type Definitions
CompiledComponent | |
ComponentArgumentName | |
ComponentArgumentOrder | |
ComponentArgumentType | |
ComponentArgumentsMap | |
ComponentName | |
FilteredComponentArguments | |
SyntaxError | Error that can happen during hot-reload - stringified, since it is only used for printing and is not exposed in the public API |
XmlAttributeKey | Key of an attribute, such as the "color" in |
XmlAttributeMap | Attributes of an XML node, such as |
XmlAttributeValue | Value of an attribute, such as the "blue" in |
XmlTagName | Tag of an XML node, such as the "button" in |
XmlTextContent | (Unparsed) text content of an XML node, such as the "Hello" in |