Skip to main content

usable_content_width

Function usable_content_width 

Source
pub fn usable_content_width(
    total_width: usize,
    reserved_cols: usize,
) -> Option<usize>
Expand description

Returns usable content width after reserving fixed columns.

Guarantees a strict positive width (Some(n) where n > 0) or None when the reserved columns consume the full width.

Treat None as “render prefix-only fallback”. Coercing it to 0 and still attempting wrapped rendering often produces empty or unstable output at very narrow terminal widths.