pub fn activity(style: &PieceStyle, lit: bool) -> Span<'static>Expand description
The activity mark: one cell, lit or dark.
Rule 2 of wiki loading-and-progress-standard, and the surface the metaphor
came from. A hard-disk light is one cell that blinks, and a terminal draws
that with no metaphor in the way — where a webview needs a keyframe and egui
needs a repaint schedule, this is a character.
The two glyphs are PieceStyle::meter_full and
PieceStyle::meter_empty, not a third pair. A bar’s filled cell and a lit
mark are the same statement in the same alphabet, and a terminal that had to
render two vocabularies of “on” would be saying there are two kinds of on.
Dark, not absent. A mark that is drawn half the time is a hole in the line, and the line reflows around it or the reader loses where to look. It occupies its cell either way.
lit is the caller’s: this module holds no clock. crate::activity_lit
is the one place the phase is worked out from the cadence, so a caller
should reach for that rather than dividing by 500 itself.