html_dsl/types/html/lists

Types

Exists to prevent strings from being passed to ul and ol

pub opaque type List

Functions

pub fn add(
  root: List,
  attributes attributes: Option(Attribute),
  inner inner: String,
) -> List

This creates a string that represents a list item element

  • @param root: The list element
  • @param attributes: The attributes of the element
  • @param inner: The inner content of the element
  • @returns: A ListItem
pub fn end(li: List) -> String

Closes the element

  • @param li: The list element
  • @returns: A string that represents the HTML element
pub fn li_to_string(li: List) -> String

This creates a string that represents a list element

  • @param li: The list element
  • @returns: A string that represents the HTML element
pub fn ol(attributes attributes: Option(Attribute)) -> List

This creates a string that represents an ordered list element

  • @param attributes: The attributes of the element
  • @returns: A string that represents the HTML element
pub fn ul(attributes attributes: Option(Attribute)) -> List

This creates a string that represents an unordered list element

  • @param attributes: The attributes of the element
  • @returns: A string that represents the HTML element
Search Document