Skip to content

v1.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 03 Nov 09:40
· 44 commits to main since this release

Added

  • Element, Attribute and Document types
  • html function to create an html document
  • Attribute values and text elements are escaped for HTML
  • Attributes
    • lang
    • id
    • class
    • name
    • src
  • Elements
    • Html document (html, head and body)
    • Meta (meta, meta_viewport, link, script, title) and related attributes
      (charset, content, rel, async, defer, integrity, type, src, and crossorigin)
    • Text (h1 to h6, p, span, small, br and text)
    • Container (div, article, section, header, main, footer)
    • Table (table, thead, tbody, tfoot, tr, th, td)
    • Anchor (a) and related attributes (href, target and download)
    • Image (img) and related attributes (src, alt, width and height)
    • Lists (ul, ol and li)
    • Forms (form, fieldset, input, label, select, option) and related attributes
      (action, method, placeholder, for, value, min, max, minlength, maxlength, multiple, type_*)
    • Escape hatches (raw and raw_unsafe)
  • implement From<(&'static str, Cow<'static, str)> for Attribute
  • implement From<&'static str> and From<String> for Element
  • implement From<[Element; N]> and From<Vec<Element>> for Element (group elements without wrapping them in a div)
  • Feature flags
    • std: Enabled by default. Disable it to compile to no_std
    • rocket_v05 : implement rocket::response::Responder for Document and Element (for rocket 0.5)