pub enum StatusItem {
Text(String),
Hints(usize),
Spinner {
name: String,
text: String,
},
Badge {
text: String,
style: Style,
},
Icon {
icon: Vec<Segment>,
text: String,
},
}Expand description
One part of a StatusBar.
Variants§
Text(String)
Console markup: [bold]main.rs[/] · 12 lines.
Hints(usize)
Up to this many key hints (ctrl+s save · esc cancel), read from
the keymap the bar is given, or the component’s under
Overlays.
Spinner
A spinner (one of core’s, by name: dots, line, …) and markup
after it. Its frame is picked by the time since the bar was made, as
core’s Spinner picks it, and the bar ticks while one shows.
Badge
A short label in a style of its own, padded by a space each side: a mode, a count, a state.
Icon
An icon, then markup: a micro asset’s badge (✅ deployed). The
icon is one line of cells (kit::icon) with its style metadata,
so a micro asset’s placeholder is drawn over by the painter’s
graphics where the terminal can show images, and shows its emoji or
text fallback anywhere else.