Crate gen_html

Source
Expand description

§gen-html

gen-html is a library for generating HTML from Rust code.

§Example

use gen_html::{content::h1, inline_text::a, text_content::{div, p}};

let html = div((
    h1("This is a title"),
    p("Some paragraph"),
    p(("You can put <a> inside <p> ", a("click me").href("https://some-url.com")))
));

Modules§

attribute
content
Content sectioning elements.
edits
Demarcating edits elements.
inline_text
Inline text elements.
root
text_content
Text content elements.

Traits§

FlowContent
The Flow content category.
NonInteractiveContent
Non-interactive content category.
PhrasingContent
The Phrasing content category.
Render
Render HTML to a string.