pub struct InlineListItem {
pub title: String,
pub subtitle: Option<String>,
pub badge: Option<String>,
pub indent: u8,
pub selection: Option<InlineListSelection>,
pub search_value: Option<String>,
pub value: Option<String>,
pub badge_tone: InlineTone,
pub kind: InlineItemKind,
}Expand description
A selectable item inside a list overlay.
Fields§
§title: String§subtitle: Option<String>Secondary description / metadata. Rendered dimmed; do not pack the
live value here — use Self::value so the renderer can accent it.
badge: Option<String>Short trailing/leading label (provider, “On”, “Edit”, …).
indent: u8§selection: Option<InlineListSelection>§search_value: Option<String>§value: Option<String>Live value for setting rows (accent-styled by the renderer).
badge_tone: InlineToneSemantic tone for badge (and for value emphasis on setting rows).
kind: InlineItemKindRow role controlling title emphasis and spacing.
Implementations§
Source§impl InlineListItem
impl InlineListItem
Sourcepub fn new(
title: impl Into<String>,
selection: Option<InlineListSelection>,
) -> Self
pub fn new( title: impl Into<String>, selection: Option<InlineListSelection>, ) -> Self
Minimal selectable row: title + selection, everything else default.
Sourcepub fn group_header(title: impl Into<String>) -> Self
pub fn group_header(title: impl Into<String>) -> Self
Shared group header: bold title, blank spacing above and below. Use for every grouped modal list so sections read the same way.
Sourcepub fn group_divider() -> Self
pub fn group_divider() -> Self
Full-width rule between option groups (approve vs deny, lists vs actions).
pub fn with_subtitle(self, subtitle: impl Into<String>) -> Self
pub fn with_value(self, value: impl Into<String>) -> Self
pub fn with_badge(self, label: impl Into<String>, tone: InlineTone) -> Self
pub fn with_kind(self, kind: InlineItemKind) -> Self
pub fn with_indent(self, indent: u8) -> Self
pub fn with_search_value(self, search_value: impl Into<String>) -> Self
Sourcepub fn is_header(&self) -> bool
pub fn is_header(&self) -> bool
Legacy section-header heuristic: non-selectable rows that are not
dividers act as group headers (bold title + blank gap). Explicit
InlineItemKind::Hint rows are notes, not headers.