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 sum Unicode scalar columns, like crate::width::fit_line and crate::progress::ProgressLine. Joined emoji count their scalar widths separately; sequence-specific ligatures do not alter column accounting. 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.