Enum cursive::theme::ColorType
[−]
[src]
pub enum ColorType { Palette(PaletteColor), Color(Color), }
Either a color from the palette, or a direct color.
Variants
Palette(PaletteColor)
Uses a color from the application palette.
Color(Color)
Uses a direct color, independent of the current palette.
Methods
impl ColorType
[src]
pub fn resolve(self, palette: &Palette) -> Color
[src]
Given a palette, resolve self
to a concrete color.
Trait Implementations
impl From<ColorType> for Style
[src]
impl From<ColorType> for ColorStyle
[src]
impl Clone for ColorType
[src]
fn clone(&self) -> ColorType
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for ColorType
[src]
impl Debug for ColorType
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for ColorType
[src]
fn eq(&self, __arg_0: &ColorType) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ColorType) -> bool
[src]
This method tests for !=
.
impl Eq for ColorType
[src]
impl Hash for ColorType
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<Color> for ColorType
[src]
impl From<PaletteColor> for ColorType
[src]
fn from(color: PaletteColor) -> Self
[src]
Performs the conversion.