pub enum CellWidth {
Continuation,
Single,
Wide,
}Expand description
How many terminal columns a Cell covers, modeling East Asian
double-width glyphs and emoji, which occupy two columns.
This crate does not compute width — that needs the Unicode database, which
a zero-dependency crate cannot own. Callers pick the width (e.g. from the
uwidth crate); the renderers here honor whatever they are given.
Variants§
Continuation
The right half of the double-width glyph to its left: it carries no character of its own and is never emitted, because the terminal advances the cursor by two columns when it draws the lead glyph.
Single
A normal single-width cell (the common case, and the default).
Wide
The left half (lead) of a double-width glyph; the cell holds the
character, and the cell immediately to its right should be a
CellWidth::Continuation.
Implementations§
Trait Implementations§
impl Copy for CellWidth
impl Eq for CellWidth
impl StructuralPartialEq for CellWidth
Auto Trait Implementations§
impl Freeze for CellWidth
impl RefUnwindSafe for CellWidth
impl Send for CellWidth
impl Sync for CellWidth
impl Unpin for CellWidth
impl UnsafeUnpin for CellWidth
impl UnwindSafe for CellWidth
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