[−][src]Enum ncursesw::BaseColor
One of the 8 base colors.
Variants
Black color
Color #0
Red color
Color #1
Green color
Color #2
Yellow color (Red + Green)
Color #3
Blue color
Color #4
Magenta color (Red + Blue)
Color #5
Cyan color (Green + Blue)
Color #6
White color (Red + Green + Blue)
Color #7
Trait Implementations
impl Clone for BaseColor
[src]
impl Copy for BaseColor
[src]
impl Debug for BaseColor
[src]
impl Eq for BaseColor
[src]
impl FromStr for BaseColor
[src]
type Err = NCurseswError
The associated error which can be returned from parsing.
fn from_str(color: &str) -> Result<Self, Self::Err>
[src]
Parse a string to instance a base color.
Valid values are 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white'
Example
use std::str::FromStr; let red = BaseColor::from_str("red")?; let green = BaseColor::from_str("green")?; let blue = BaseColor::from_str("blue")?; assert!(red == BaseColor::Red); assert!(green == BaseColor::Green); assert!(blue == BaseColor::Blue);
impl Hash for BaseColor
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<BaseColor> for BaseColor
[src]
impl StructuralEq for BaseColor
[src]
impl StructuralPartialEq for BaseColor
[src]
Auto Trait Implementations
impl RefUnwindSafe for BaseColor
impl Send for BaseColor
impl Sync for BaseColor
impl Unpin for BaseColor
impl UnwindSafe for BaseColor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,