pub struct CellColor(/* private fields */);Expand description
One packed color value. All-zero = terminal default (no escape).
Implementations§
Source§impl CellColor
impl CellColor
Sourcepub fn as_ansi256(self) -> Option<u8>
pub fn as_ansi256(self) -> Option<u8>
This color as an ANSI-256 index, quantizing RGB if needed.
Returns None for CellColor::DEFAULT (the consumer’s
“no color set” — use its own default ink).
Trait Implementations§
impl Copy for CellColor
impl Eq for CellColor
impl StructuralPartialEq for CellColor
Auto Trait Implementations§
impl Freeze for CellColor
impl RefUnwindSafe for CellColor
impl Send for CellColor
impl Sync for CellColor
impl Unpin for CellColor
impl UnsafeUnpin for CellColor
impl UnwindSafe for CellColor
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