Enum cursive::theme::PaletteColor [−][src]
pub enum PaletteColor { Background, Shadow, View, Primary, Secondary, Tertiary, TitlePrimary, TitleSecondary, Highlight, HighlightInactive, }
Color entry in a palette.
Each PaletteColor
is used for a specific role in a default application.
Variants
Background
Color used for the application background.
Shadow
Color used for View shadows.
View
Color used for View backgrounds.
Primary
Primary color used for the text.
Secondary
Secondary color used for the text.
Tertiary
Tertiary color used for the text.
TitlePrimary
Primary color used for title text.
TitleSecondary
Secondary color used for title text.
Highlight
Color used for highlighting text.
HighlightInactive
Color used for highlighting inactive text.
Methods
impl PaletteColor
[src]
impl PaletteColor
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<PaletteColor> for ColorStyle
[src]
impl From<PaletteColor> for ColorStyle
fn from(color: PaletteColor) -> Self
[src]
fn from(color: PaletteColor) -> Self
Performs the conversion.
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 Index<PaletteColor> for Palette
[src]
impl Index<PaletteColor> for Palette
type Output = Color
The returned type after indexing.
fn index(&self, palette_color: PaletteColor) -> &Color
[src]
fn index(&self, palette_color: PaletteColor) -> &Color
Performs the indexing (container[index]
) operation.
impl IndexMut<PaletteColor> for Palette
[src]
impl IndexMut<PaletteColor> for Palette
fn index_mut(&mut self, palette_color: PaletteColor) -> &mut Color
[src]
fn index_mut(&mut self, palette_color: PaletteColor) -> &mut Color
Performs the mutable indexing (container[index]
) operation.
impl Clone for PaletteColor
[src]
impl Clone for PaletteColor
fn clone(&self) -> PaletteColor
[src]
fn clone(&self) -> PaletteColor
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)
Performs copy-assignment from source
. Read more
impl Copy for PaletteColor
[src]
impl Copy for PaletteColor
impl Debug for PaletteColor
[src]
impl Debug for PaletteColor
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 PaletteColor
[src]
impl PartialEq for PaletteColor
fn eq(&self, other: &PaletteColor) -> bool
[src]
fn eq(&self, other: &PaletteColor) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for PaletteColor
[src]
impl Eq for PaletteColor
impl Hash for PaletteColor
[src]
impl Hash for PaletteColor
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,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<V> Enum<V> for PaletteColor
[src]
impl<V> Enum<V> for PaletteColor
type Array = [V; 10]
Representation of an enum map for type V
, usually an array.
const POSSIBLE_VALUES: usize
POSSIBLE_VALUES: usize = 10usize
Number of possible states the type can have.
fn slice(array: &Self::Array) -> &[V]
[src]
fn slice(array: &Self::Array) -> &[V]
Gets a slice from an array type.
fn slice_mut(array: &mut Self::Array) -> &mut [V]
[src]
fn slice_mut(array: &mut Self::Array) -> &mut [V]
Gets a mutable slice from an array type.
fn from_usize(value: usize) -> Self
[src]
fn from_usize(value: usize) -> Self
Takes an usize, and returns an element matching to_usize
function.
fn to_usize(self) -> usize
[src]
fn to_usize(self) -> usize
Returns an unique identifier for a value within range of 0..POSSIBLE_VALUES
.
fn from_function<F: FnMut(Self) -> V>(_f: F) -> Self::Array
[src]
fn from_function<F: FnMut(Self) -> V>(_f: F) -> Self::Array
Creates an array using a function called for each argument.
impl From<PaletteColor> for Style
[src]
impl From<PaletteColor> for Style
fn from(color: PaletteColor) -> Self
[src]
fn from(color: PaletteColor) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for PaletteColor
impl Send for PaletteColor
impl Sync for PaletteColor
impl Sync for PaletteColor