Enum ncursesw::normal::ColorPalette
source · [−]pub enum ColorPalette {
Show 18 variants
TerminalDefault,
Black,
Red,
Green,
Yellow,
Blue,
Magenta,
Cyan,
White,
LightBlack,
LightRed,
LightGreen,
LightYellow,
LightBlue,
LightMagenta,
LightCyan,
LightWhite,
Custom(short_t),
}
Expand description
The color palette.
The first 8 color’s are considered dark colors, the next 8 (if available) are considered light colors.
Variants
TerminalDefault
Color #-1
Black
Black color
Color #0
Red
Red color
Color #1
Green
Green color
Color #2
Yellow
Yellow/Brown color (Red + Green)
Color #3
Blue
Blue color
Color #4
Magenta
Magenta color (Red + Blue)
Color #5
Cyan
Cyan color (Green + Blue)
Color #6
White
White color (Red + Green + Blue)
Color #7
LightBlack
Light black color
Color #8
LightRed
Light red color
Color #9
LightGreen
Light green color
Color #10
LightYellow
Light yellow color (LightRed + LightGreen)
Color #11
LightBlue
Light blue color
Color #12
LightMagenta
Light magenta color (LightRed + LightBlue)
Color #13
LightCyan
Light cyan color (LightGreen + LightBlue)
Color #14
LightWhite
Light white color (LightRed + LightGreen + LightBlue)
Color #15
Custom(short_t)
Custom color
Trait Implementations
sourceimpl Clone for ColorPalette
impl Clone for ColorPalette
sourcefn clone(&self) -> ColorPalette
fn clone(&self) -> ColorPalette
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ColorPalette
impl Debug for ColorPalette
impl Default for ColorPalette
impl Default for ColorPalette
impl FromStr for ColorPalette
impl FromStr for ColorPalette
fn from_str(color: &str) -> Result<Self, Self::Err>
fn from_str(color: &str) -> Result<Self, Self::Err>
Parse a string to instance a color palette.
Valid values are: ‘default’, ‘black’, ‘red’, ‘green’, ‘yellow’, ‘blue’, ‘magenta’, ‘cyan’, ‘white’, ‘light black’, ‘light red’, ‘light green’, ‘light yellow’, ‘light blue’, ‘light magenta’, ‘light cyan’, ‘light white’
type Err = NCurseswError
type Err = NCurseswError
The associated error which can be returned from parsing.
sourceimpl Hash for ColorPalette
impl Hash for ColorPalette
sourceimpl PartialEq<ColorPalette> for ColorPalette
impl PartialEq<ColorPalette> for ColorPalette
sourcefn eq(&self, other: &ColorPalette) -> bool
fn eq(&self, other: &ColorPalette) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ColorPalette) -> bool
fn ne(&self, other: &ColorPalette) -> bool
This method tests for !=
.
impl Copy for ColorPalette
impl Eq for ColorPalette
impl StructuralEq for ColorPalette
impl StructuralPartialEq for ColorPalette
Auto Trait Implementations
impl RefUnwindSafe for ColorPalette
impl Send for ColorPalette
impl Sync for ColorPalette
impl Unpin for ColorPalette
impl UnwindSafe for ColorPalette
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more