m3e/text_highlight

TextHighlight is highlights text which matches a given search term.

This file was generated by m3e/generator

     DO NOT EDIT

Types

CaseSensitive is whether matching is case sensitive.

pub type CaseSensitive {
  IsCaseSensitive
  IsNotCaseSensitive
}

Constructors

  • IsCaseSensitive
  • IsNotCaseSensitive

Config is a public record for configuring this component.

pub type Config {
  Config(
    case_sensitive: CaseSensitive,
    disabled: Disabled,
    mode: text_highlight_mode.TextHighlightMode,
    term: String,
  )
}

Constructors

Disabled is a value indicating whether text highlighting is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

TextHighlight is a View Model for this component

Fields:

  • case_sensitive: Whether matching is case sensitive.
  • disabled: A value indicating whether text highlighting is disabled.
  • mode: The mode in which to highlight text.
  • term: The term to highlight.
pub opaque type TextHighlight

Values

pub fn case_sensitive(
  record: TextHighlight,
  case_sensitive: CaseSensitive,
) -> TextHighlight

case_sensitive sets the value of case_sensitive for this TextHighlight.

pub const default_case_sensitive: CaseSensitive
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_term: String
pub fn disabled(
  record: TextHighlight,
  disabled: Disabled,
) -> TextHighlight

disabled sets the value of disabled for this TextHighlight.

pub fn from_config(config: Config) -> TextHighlight

from_config creates a new TextHighlight from the given configuration.

pub fn mode(
  record: TextHighlight,
  mode: text_highlight_mode.TextHighlightMode,
) -> TextHighlight

mode sets the value of mode for this TextHighlight.

pub fn new() -> TextHighlight

new creates a new TextHighlight with the default configuration.

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

render creates a Lustre Element for a TextHighlight

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 TextHighlight Config

pub fn term(record: TextHighlight, term: String) -> TextHighlight

term sets the value of term for this TextHighlight.

Search Document