Skip to main content

render

Function render 

Source
pub fn render<const N: usize>(
    headers: &[impl AsRef<str>; N],
    rows: &[[impl AsRef<str>; N]],
    alignments: &[Alignment; N],
    options: Options,
) -> String
Expand description

Render headers and rows after escaping every cell, including headers.

Widths use Unicode terminal display columns, not byte or character counts. Rows have the same column count by type. Header/data lines omit trailing whitespace; the result has no final newline. Zero columns return empty text. Caller owns input/output size, row construction, headers, column choices, truncation and all output, terminal detection, colour and progress behavior. Storage allocation follows ordinary String/Vec allocation semantics.