pub trait TerminalSetup {
type B: Backend;
// Required methods
fn enable(&mut self) -> Result<()>;
fn create_terminal(&mut self) -> Result<Terminal<Self::B>>;
fn disable(&mut self);
fn print_done(&self);
}Expand description
Abstracts terminal setup/teardown so a UI’s generic core can be tested with
a ratatui::backend::TestBackend and no-op TTY operations. The real
crossterm implementation (CrosstermSetup) lives in the binary, since it
can only be exercised against a real terminal.
Required Associated Types§
Required Methods§
fn enable(&mut self) -> Result<()>
fn create_terminal(&mut self) -> Result<Terminal<Self::B>>
fn disable(&mut self)
fn print_done(&self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".