pub struct Cell {
pub symbol: String,
pub style: Style,
pub skip: bool,
}Expand description
A single cell in the terminal buffer.
Each cell stores a grapheme cluster, style, and skip flag for wide characters.
Fields§
§symbol: StringThe symbol (grapheme cluster) to display
style: StyleThe style for this cell
skip: boolSkip rendering flag (for wide character continuations)
Implementations§
Source§impl Cell
impl Cell
Sourcepub fn new(symbol: impl Into<String>, style: Style) -> Self
pub fn new(symbol: impl Into<String>, style: Style) -> Self
Create a new cell with the given symbol and style.
§Example
use tuxtui_core::buffer::Cell;
use tuxtui_core::style::Style;
let cell = Cell::new("x", Style::default());Sourcepub fn set_symbol(&mut self, symbol: impl Into<String>)
pub fn set_symbol(&mut self, symbol: impl Into<String>)
Set the symbol for this cell.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cell
impl<'de> Deserialize<'de> for Cell
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.