pub struct Cell {
pub char: char,
pub fg: Color,
pub bg: Color,
pub style: Style,
pub wide: bool,
}Expand description
A single cell in the screen buffer.
Each cell stores a character, foreground color, background color, and style flags. When the screen is rendered, only cells that changed from the previous frame are written to the terminal.
For wide (CJK/fullwidth) characters that occupy 2 columns, the first
column holds the character and wide is false. The second column
is a “continuation” cell with wide = true, which tells the renderer
not to write it separately (the terminal already rendered it as part
of the wide character).
Fields§
§char: char§fg: Color§bg: Color§style: Style§wide: boolWhether this cell is the continuation (second column) of a wide character. Continuation cells are skipped during rendering because the terminal already drew them as part of the wide character.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Cell
Auto Trait Implementations§
impl Freeze for Cell
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnsafeUnpin for Cell
impl UnwindSafe for Cell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more