Skip to main content

display_width

Function display_width 

Source
pub fn display_width(
    fmt: &CellFormatter,
    value: &AnyValue<'_>,
    scratch: &mut String,
) -> usize
Expand description

Cells a value takes on screen without building its string, where possible.

Integers take the arithmetic path; everything else is rendered and measured in terminal cells, as the table measures it. For a pass that needs widths only.