Expand description
A Color representation in ANSI sequences.
Variants
Bit4(u8)
A color from VisualAttribute.
An example: ESC[39;49m
.
Bit8(u8)
An index color.
An example: ESC[38:5:⟨n⟩m
.
Bit24
A 3 digit color.
An example: ESC[48;2;⟨r⟩;⟨g⟩;⟨b⟩m
.
Trait Implementations
sourceimpl Ord for AnsiColor
impl Ord for AnsiColor
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<AnsiColor> for AnsiColor
impl PartialOrd<AnsiColor> for AnsiColor
sourcefn partial_cmp(&self, other: &AnsiColor) -> Option<Ordering>
fn partial_cmp(&self, other: &AnsiColor) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for AnsiColor
impl Eq for AnsiColor
impl StructuralEq for AnsiColor
impl StructuralPartialEq for AnsiColor
Auto Trait Implementations
impl RefUnwindSafe for AnsiColor
impl Send for AnsiColor
impl Sync for AnsiColor
impl Unpin for AnsiColor
impl UnwindSafe for AnsiColor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more