Expand description
Panic hook implementation for terminal UI applications This module provides a panic hook that restores terminal state when a panic occurs, preventing terminal corruption, and provides enhanced panic formatting for different build types.
Structs§
- TuiPanic
Guard - A guard struct that automatically registers and unregisters TUI state with the panic hook system.
Functions§
- init_
panic_ hook - Initialize the panic hook to restore terminal state on panic and provide better formatting
- is_
debug_ mode - Get whether the application is in debug mode
- mark_
tui_ deinitialized - Mark that TUI has been deinitialized to prevent further restoration attempts
- mark_
tui_ initialized - Mark that TUI has been initialized so panic hook knows to restore terminal
- restore_
tui - Restore terminal to a usable state after a panic
- set_
debug_ mode - Set whether the application is in debug mode