Expand description
Width guards for transcript rendering with fixed prefix columns.
Several rendering paths reserve a fixed number of columns for bullets, gutters, or labels before laying out content. When the terminal is very narrow, those reserved columns can consume the entire width, leaving zero or negative space for content.
These helpers centralise the subtraction and enforce a strict-positive
contract: they return Some(n) where n > 0, or None when no usable
content width remains. Callers treat None as “render prefix-only
fallback” rather than attempting wrapped rendering at zero width, which
would produce empty or unstable output.
Functions§
- usable_
content_ width - Returns usable content width after reserving fixed columns.
- usable_
content_ width_ u16 u16convenience wrapper aroundusable_content_width.