pub struct Cell {
pub ch: char,
pub style: Style,
pub width: usize,
pub hyperlink: Option<Arc<str>>,
}Expand description
A terminal cell: one character, its visual style, and display width.
Fields§
§ch: charCharacter emitted for this cell.
style: StyleVisual style applied while emitting this cell.
width: usizeDisplay width in terminal columns.
hyperlink: Option<Arc<str>>Sanitized OSC 8 target active for this cell.
Implementations§
Source§impl Cell
impl Cell
Sourcepub fn new(ch: char, style: Style) -> Cell
pub fn new(ch: char, style: Style) -> Cell
Creates a styled terminal cell, sanitizing control characters.
Sourcepub fn plain(ch: char) -> Cell
pub fn plain(ch: char) -> Cell
Creates an unstyled terminal cell, sanitizing control characters.
Sourcepub fn with_width(self, width: usize) -> Cell
pub fn with_width(self, width: usize) -> Cell
Returns a copy of this cell with an explicit display width.
Trait Implementations§
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