This module of Adapton Lab extends Adapton's existing reflection
(see adapton::engine::reflect
) with further reflections. In
particular, we produce HTML output structure, for human user
interaction and consumption.
Div |
The Div struct represents a restricted form of a <div> element
in HTML. The field tag is a string, which corresponds to a
distinguished tag CSS class that indicates the Rust datatype
reflected into this Div . The other CSS classes hold bits that
signal various subcases (e.g., of enum s in the reflect
module). For Rust structures that have subfields and/or
substructure, the Div 's extent field lists their reflections
into Div s. In principle, the produced Div structure has an
equivalent amount of information to the corresponding Rust
datatype, and could be "parsed" back into this Rust datatype later
(let's not do that, though!). The text field is useful for Div
versions of Name s, for giving the text of the name.
|