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