Skip to main content

negotiate

Function negotiate 

Source
pub fn negotiate(timeout: Duration) -> (TerminalCaps, ProbeResults)
Expand description

Negotiates terminal graphics capabilities while preserving every non-probe byte received during the probe window.

On Unix this opens /dev/tty, temporarily applies raw non-blocking mode, and restores both termios and descriptor flags before returning. If the controlling terminal is unavailable, environment capabilities and an empty probe result are returned.