pub enum Color {
Ansi256(Ansi256),
Ansi4Bit(Ansi4Bit),
Rgb(Rgb),
String(String),
}Available on crate feature
unstable only.Variants§
Implementations§
Source§impl Color
impl Color
pub const fn new() -> Self
pub fn with(s: String) -> Self
pub fn four_bit(n: u8) -> Color
pub fn fg_fixed(n: u8) -> Color
pub fn bg_fixed(n: u8) -> Color
pub fn fg_rgb(r: u8, g: u8, b: u8) -> Color
pub fn bg_rgb(r: u8, g: u8, b: u8) -> Color
pub fn fg_hex(h: &str) -> Color
pub fn bg_hex(h: &str) -> Color
pub fn is_reset(&self) -> bool
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl AddAssign for Color
impl AddAssign for Color
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreimpl Eq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more