Skip to main content

Module rata

Module rata 

Source
Expand description

Every screen row in the TUI, drawn by ratatui.

The seam is Term::draw, which takes one ANSI string per screen row. Term keeps the pty, the raw mode, the resize handling and the key decoding; only content generation lives here. A widget renders into a [Buffer] and flatten turns that buffer back into the rows draw already paints, so the port cost nothing at the boundary — term::Row, the hand-rolled width-tracking line builder this replaces, is gone rather than wrapped.

No backend is linked. ratatui’s CrosstermBackend would bring crossterm, mio, signal-hook and parking_lot to do what term.rs already does, so the dependency is ratatui with default-features = false: the widgets and the layout solver, nothing that touches a terminal. That is most of why the measured cost is +26 crates rather than the +48 a default build wanted.

Functions§

bar
A bar with one group pinned left and one pinned right.
columns
One row laid out in fixed columns, each clipped to its own column.
detail
One record’s fields, its attributes, then its events and links — each section a two-column Table under a rule.
flatten 🔒
One ANSI string per buffer line, coalescing runs that share a style.
hl
The style a selected row is drawn in.
log_list
The log list: one Table of four columns, with a scrollbar in the gutter.
paint 🔒
Render into a fresh w × h buffer and flatten it to rows.
row
One screen row from spans, clipped and padded to w.
row_styled
row, with a style under the whole width rather than under the text.
rule
A full-width rule with a title set into it.
sev
The style a severity is drawn in: the OTLP number bands, not a guess at severity_text, which is free-form and frequently absent.
sgr 🔒
The SGR run for one cell’s style, in the escapes term already declares.