pub struct Cell {
pub symbol: String,
pub foreground_color: Option<Color>,
pub background_color: Option<Color>,
pub attributes: Attributes,
}Expand description
Cell contains the attributes of the char used in the buffer. This information is needed when rendering each cell to the terminal
Fields§
§symbol: Stringthe character symbol
foreground_color: Option<Color>The foreground color.
background_color: Option<Color>The background color.
attributes: AttributesList of attributes.
Implementations§
Source§impl Cell
impl Cell
Sourcepub fn unicode_width(&self) -> usize
pub fn unicode_width(&self) -> usize
returns the unicode width of the cell. Some characters are wide such as CJK
Sourcepub fn is_filler(&self) -> bool
pub fn is_filler(&self) -> bool
whether or not this cell is a filler of a wide character that appears before it
Sourcepub fn attributes(&mut self, attributes: Vec<Attribute>)
pub fn attributes(&mut self, attributes: Vec<Attribute>)
return the attributes of this cell
Sourcepub fn background(&mut self, color: Color)
pub fn background(&mut self, color: Color)
set the background color of this cell
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 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