pub struct Cell {
pub fg: Color,
pub bg: Color,
pub modifier: Modifier,
pub skip: bool,
/* private fields */
}
Expand description
A buffer cell
Fields§
§fg: Color
The foreground color of the cell.
bg: Color
The background color of the cell.
modifier: Modifier
The modifier of the cell.
skip: bool
Whether the cell should be skipped when copying (diffing) the buffer to the screen.
Implementations§
source§impl Cell
impl Cell
sourcepub fn set_symbol(&mut self, symbol: &str) -> &mut Cell
pub fn set_symbol(&mut self, symbol: &str) -> &mut Cell
Sets the symbol of the cell.
sourcepub fn set_char(&mut self, ch: char) -> &mut Cell
pub fn set_char(&mut self, ch: char) -> &mut Cell
Sets the symbol of the cell to a single character.
sourcepub fn set_style<S>(&mut self, style: S) -> &mut Cell
pub fn set_style<S>(&mut self, style: S) -> &mut Cell
Sets the style of the cell.
style
accepts any type that is convertible to Style
(e.g. Style
, Color
, or
your own type that implements Into<Style>
).
sourcepub fn set_skip(&mut self, skip: bool) -> &mut Cell
pub fn set_skip(&mut self, skip: bool) -> &mut Cell
Sets the cell to be skipped when copying (diffing) the buffer to the screen.
This is helpful when it is necessary to prevent the buffer from overwriting a cell that is covered by an image from some terminal graphics protocol (Sixel / iTerm / Kitty …).
Trait Implementations§
source§impl PartialEq for Cell
impl PartialEq for Cell
impl Eq for Cell
impl StructuralPartialEq for Cell
Auto Trait Implementations§
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin 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