m3e/toc_item

TocItem is an item in a table of contents.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(disabled: Disabled, selected: Selected)
}

Constructors

Disabled is a value indicating whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

Selected is whether the element is selected.

pub type Selected {
  IsSelected
  IsNotSelected
}

Constructors

  • IsSelected
  • IsNotSelected

TocItem is a View Model for this component

Fields:

  • disabled: A value indicating whether the element is disabled.
  • selected: Whether the element is selected.
pub opaque type TocItem

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_selected: Selected
pub fn disabled(record: TocItem, disabled: Disabled) -> TocItem

disabled sets the value of disabled for this TocItem.

pub fn from_config(config: Config) -> TocItem

from_config creates a new TocItem from the given configuration.

pub fn new() -> TocItem

new creates a new TocItem with the default configuration.

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

render creates a Lustre Element for a TocItem

pub fn render_config(
  c: Config,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element from a TocItem Config

pub fn selected(record: TocItem, selected: Selected) -> TocItem

selected sets the value of selected for this TocItem.

Search Document