pub enum AmbiguousWidth {
Narrow,
Wide,
Auto,
}Expand description
How to treat Unicode East_Asian_Width=Ambiguous characters.
Examples: Φ, ±, ×, Ⅱ, ①. These are 1 column in most Western
terminals and 2 columns in most CJK terminals.
Variants§
Narrow
Count ambiguous characters as 1 column (Western terminal default).
Wide
Count ambiguous characters as 2 columns (CJK terminal default).
Auto
Decide from environment variables at render time.
Trait Implementations§
Source§impl Clone for AmbiguousWidth
impl Clone for AmbiguousWidth
impl Copy for AmbiguousWidth
Source§impl Debug for AmbiguousWidth
impl Debug for AmbiguousWidth
Source§impl Default for AmbiguousWidth
impl Default for AmbiguousWidth
Source§fn default() -> Self
fn default() -> Self
Default is AmbiguousWidth::Wide, matching CJK terminals.
Rationale: the crate targets CJK output by default. Auto guesses
from LANG/LC_*, but environment locale does not necessarily match
how the terminal renders ambiguous characters. A fixed default is
more predictable; callers can override per Table.
impl Eq for AmbiguousWidth
Source§impl PartialEq for AmbiguousWidth
impl PartialEq for AmbiguousWidth
impl StructuralPartialEq for AmbiguousWidth
Auto Trait Implementations§
impl Forget for AmbiguousWidth
impl Freeze for AmbiguousWidth
impl Move for AmbiguousWidth
impl RefUnwindSafe for AmbiguousWidth
impl Send for AmbiguousWidth
impl Sync for AmbiguousWidth
impl Unpin for AmbiguousWidth
impl UnsafeUnpin for AmbiguousWidth
impl UnwindSafe for AmbiguousWidth
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