Skip to main content

capabilities

Function capabilities 

Source
pub fn capabilities() -> Capabilities
Available on crate feature crossterm only.
Expand description

Runtime terminal capability probe (issue #264): read-only Capabilities snapshot plus the Blitter ladder it drives. Diagnostics-only — image rendering routes through the ladder automatically. Return the process-global negotiated Capabilities, probing the terminal exactly once on first call and caching the result.

The probe issues DA1 (CSI c), DA2 (CSI > c), and XTGETTCAP for the truecolor capname, reading replies through the existing OSC round-trip infrastructure with a bounded total timeout (≤150ms). On no reply every field falls back to a conservative default. Repeated calls are free.