pub struct ThemePalette(/* private fields */);Implementations§
Source§impl ThemePalette
impl ThemePalette
Sourcepub fn get(&self, color: Color) -> Option<&ColorSet>
pub fn get(&self, color: Color) -> Option<&ColorSet>
Returns the color set for a given color, if defined.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&Color, &ColorSet)>
pub fn iter(&self) -> impl Iterator<Item = (&Color, &ColorSet)>
Returns an iterator over all palette entries.
Sourcepub fn merge(&mut self, overrides: ThemePalette)
pub fn merge(&mut self, overrides: ThemePalette)
Merges another palette on top of this one (overrides win).
Trait Implementations§
Source§impl Clone for ThemePalette
impl Clone for ThemePalette
Source§fn clone(&self) -> ThemePalette
fn clone(&self) -> ThemePalette
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ThemePalette
impl Debug for ThemePalette
Source§impl<'de> Deserialize<'de> for ThemePalette
impl<'de> Deserialize<'de> for ThemePalette
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ThemePalette
impl PartialEq for ThemePalette
Source§impl Serialize for ThemePalette
impl Serialize for ThemePalette
impl StructuralPartialEq for ThemePalette
Auto Trait Implementations§
impl Freeze for ThemePalette
impl RefUnwindSafe for ThemePalette
impl Send for ThemePalette
impl Sync for ThemePalette
impl Unpin for ThemePalette
impl UnsafeUnpin for ThemePalette
impl UnwindSafe for ThemePalette
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more