pub struct Cell {
pub ch: char,
pub fg: Color,
pub bg: Option<Color>,
pub attrs: u8,
}Expand description
A single rendered cell: a character plus optional color attributes.
Footprint is bounded by AD-011 to ~16 bytes on 64-bit targets:
ch: char— 4 bytesfg: Color— 4 bytes (variant tag + 3-byte payload forRgb)bg: Option<Color>— 5 bytes (tag + 4-byteColor)attrs: u8— 1 byte (bold / underline / reverse bitfield)
The remaining ~2 bytes are alignment padding.
Fields§
§ch: charGlyph character at this cell.
fg: ColorForeground color.
bg: Option<Color>Optional background color (None = terminal default bg).
attrs: u8SGR attribute bitfield: bit 0 = bold, bit 1 = underline, bit 2 = reverse.
Implementations§
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 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