m3e/option
Option is an option that can be selected.
This file was generated by m3e/generator
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
disabled: Disabled,
disable_highlight: DisableHighlight,
highlight_mode: text_highlight_mode.TextHighlightMode,
selected: Selected,
term: String,
value: String,
)
}
Constructors
-
Config( disabled: Disabled, disable_highlight: DisableHighlight, highlight_mode: text_highlight_mode.TextHighlightMode, selected: Selected, term: String, value: String, )
DisableHighlight is whether text highlighting is disabled.
pub type DisableHighlight {
IsDisableHighlight
IsNotDisableHighlight
}
Constructors
-
IsDisableHighlight -
IsNotDisableHighlight
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
Option is a View Model for this component
Fields:
- disabled: Whether the element is disabled.
- disable_highlight: Whether text highlighting is disabled.
- highlight_mode: The mode in which to highlight a term.
- selected: Whether the element is selected.
- term: The search term to highlight.
- value: A string representing the value of the option.
pub opaque type Option
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disable_highlight: DisableHighlight
pub const default_disabled: Disabled
pub const default_highlight_mode: text_highlight_mode.TextHighlightMode
pub const default_selected: Selected
pub const default_term: String
pub const default_value: String
pub fn disable_highlight(
record: Option,
disable_highlight: DisableHighlight,
) -> Option
disable_highlight sets the value of disable_highlight for this Option.
pub fn disabled(record: Option, disabled: Disabled) -> Option
disabled sets the value of disabled for this Option.
pub fn from_config(config: Config) -> Option
from_config creates a new Option from the given configuration.
pub fn highlight_mode(
record: Option,
highlight_mode: text_highlight_mode.TextHighlightMode,
) -> Option
highlight_mode sets the value of highlight_mode for this Option.
pub fn render(
model: Option,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a Option
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 Option Config
pub fn selected(record: Option, selected: Selected) -> Option
selected sets the value of selected for this Option.