pub fn try_restore(terminal: &mut DefaultTerminal) -> Result<()>Expand description
Restore a terminal built by the setup helpers.
This calls UncursesBackend::restore on the terminal’s backend. The
backend delegates to the wrapped screen’s teardown path, which resets staged
modes, restores cursor and screen state, flushes pending output, and leaves
raw mode.
§Parameters
terminal- a mutableDefaultTerminalreturned byinit,try_init,init_with_options, ortry_init_with_options.
§Returns
Ok(()) once teardown has completed.
§Errors
Returns any error from screen teardown, flushing, or restoring the terminal mode.
§Panics
Does not intentionally panic.
§Usage note
Treat this as the single teardown entry point for terminals initialized by this module; do not independently undo individual modes first.