Skip to main content

Module styled

Module styled 

Source
Expand description

Styled-output primitives consumed by the live TUI and report tiers.

These types form the second projection of super::AsciiRenderable: the plain method returns a String for logs, snapshot tests, and EpisodeRecord.ascii, while the styled method returns a StyledFrame carrying foreground/background colour and modifier hints. The type set is intentionally a small subset of the ratatui vocabulary so that rlevo-core ships zero terminal-side dependencies — the From<StyledFrame> conversion into ratatui types lives in rlevo-benchmarks::tui (behind the tui feature), and the report tier deserialises StyledFrame from EpisodeRecord.

No truecolor: stick to the 16-colour ANSI palette plus indexed 256-colour. See super::palette for the project-wide semantic constants every environment impl should use rather than reaching for raw Color values.

Structs§

Modifier
Bitset of style modifiers (bold, italic, etc.).
SpanStyle
Foreground / background colour and modifier bits applied to a span.
StyledFrame
A multi-line styled projection of an environment frame.
StyledLine
A single line of styled spans.
StyledSpan
A run of text with a uniform style.

Enums§

Color
16-colour ANSI palette plus indexed 256-colour escape.