pub struct Cell {
pub ch: char,
pub fg: Color,
pub bg: Color,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub dim: bool,
pub wide_continuation: bool,
}Expand description
A single cell in the terminal buffer.
Fields§
§ch: char§fg: Color§bg: Color§bold: bool§italic: bool§underline: bool§dim: bool§wide_continuation: boolTrue if this cell is the second half of a wide character (e.g., emoji, CJK). The renderer should skip these cells since the wide char already occupies the space.
Implementations§
Source§impl Cell
impl Cell
Sourcepub fn new(ch: char, fg: Color, bg: Color) -> Self
pub fn new(ch: char, fg: Color, bg: Color) -> Self
Create a new cell with just character and colors.
Sourcepub fn styled(
ch: char,
fg: Color,
bg: Color,
bold: bool,
italic: bool,
underline: bool,
dim: bool,
) -> Self
pub fn styled( ch: char, fg: Color, bg: Color, bold: bool, italic: bool, underline: bool, dim: bool, ) -> Self
Create a styled cell.
Sourcepub fn wide_continuation(fg: Color, bg: Color) -> Self
pub fn wide_continuation(fg: Color, bg: Color) -> Self
Create a wide character continuation cell (second half of emoji/CJK). The renderer should skip these cells.
Trait Implementations§
impl Copy for Cell
impl Eq for Cell
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.