pub enum Color {
Ansi(AnsiColor),
Ansi256(Ansi256Color),
Rgb(RgbColor),
}
Expand description
Any ANSI color code scheme
Variants§
Implementations§
§impl Color
impl Color
pub fn on_default(self) -> Style
pub fn on_default(self) -> Style
Create a Style
with this as the foreground
Trait Implementations§
§impl From<Ansi256Color> for Color
impl From<Ansi256Color> for Color
§fn from(inner: Ansi256Color) -> Color
fn from(inner: Ansi256Color) -> Color
Converts to this type from the input type.
§impl Ord for Color
impl Ord for Color
§impl PartialOrd for Color
impl PartialOrd for Color
§fn partial_cmp(&self, other: &Color) -> Option<Ordering>
fn partial_cmp(&self, other: &Color) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 Color
impl Eq for Color
impl StructuralEq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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