Skip to main content

Module terminal

Module terminal 

Source
Expand description

RAII wrapper around the crossterm terminal — enters raw mode + alternate screen on construction, restores on drop.

A panic hook is installed so a panic anywhere in the app still leaves the operator’s terminal usable. The hook runs before the default panic handler, so the backtrace is still visible.

Structs§

TerminalGuard
Owns the terminal for the duration of the app. Call TerminalGuard::init to enter the app mode; the guard’s Drop impl restores on exit.

Type Aliases§

Tty