m3e/toc

toc provides Lustre support for the M3E Toc component

Types

Slot gives type-safe names to each of the defined HTML named slots

pub type Slot {
  Overline
  Title
}

Constructors

  • Overline
  • Title

Toc provides Lustre support for the M3E Toc component

Fields:

  • for: The identifier of the interactive control to which this element is attached
  • max_depth: The maximum depth of the table of contents
pub opaque type Toc

Values

pub fn for(t: Toc, for: String) -> Toc

for sets the for field

pub fn max_depth(t: Toc, max_depth: Int) -> Toc

max_depth sets the max_depth field

pub fn new(for: String) -> Toc

new creates a new Toc

pub fn render(
  t: Toc,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element(msg) from a Toc

Parameters:

  • t: a Toc
  • attributes: additional attributes
  • children: additional children
pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot creates a Lustre ‘slot’ Attribute(msg) for a Slot

Search Document