Expand description
This module provides the backend implementations for different terminal libraries.
It defines the Backend
trait which is used to abstract over the specific
terminal library being used.
The following terminal libraries are supported:
- Crossterm (with the
crossterm
feature) - Termion (with the
termion
feature) - Termwiz (with the
termwiz
feature)
Additionally, a TestBackend
is provided for testing purposes.
Example
use ratatui::backend::{Backend, CrosstermBackend};
let buffer = std::io::stdout();
let mut backend = CrosstermBackend::new(buffer);
backend.clear()?;
Structs
- CrosstermBackend
crossterm
A backend implementation using thecrossterm
crate. - TermionBackend
termion
A backend that uses the Termion library to draw content, manipulate the cursor, and clear the terminal screen. - TermwizBackend
termwiz
Termwiz backend implementation for theBackend
trait. - A backend used for the integration tests.
Enums
- Enum representing the different types of clearing operations that can be performed on the terminal screen.
Traits
- The
Backend
trait provides an abstraction over different terminal libraries. It defines the methods required to draw content, manipulate the cursor, and clear the terminal screen.