pub struct ColorMap { /* private fields */ }Expand description
The twelve master-controlled mappings applied before theme colour lookup.
Implementations§
Source§impl ColorMap
impl ColorMap
Sourcepub const fn new(
background1: ThemeColorSlot,
text1: ThemeColorSlot,
background2: ThemeColorSlot,
text2: ThemeColorSlot,
accent1: ThemeColorSlot,
accent2: ThemeColorSlot,
accent3: ThemeColorSlot,
accent4: ThemeColorSlot,
accent5: ThemeColorSlot,
accent6: ThemeColorSlot,
hyperlink: ThemeColorSlot,
followed_hyperlink: ThemeColorSlot,
) -> Self
pub const fn new( background1: ThemeColorSlot, text1: ThemeColorSlot, background2: ThemeColorSlot, text2: ThemeColorSlot, accent1: ThemeColorSlot, accent2: ThemeColorSlot, accent3: ThemeColorSlot, accent4: ThemeColorSlot, accent5: ThemeColorSlot, accent6: ThemeColorSlot, hyperlink: ThemeColorSlot, followed_hyperlink: ThemeColorSlot, ) -> Self
Creates a colour map from parsed master values in schema attribute order.
Sourcepub const fn theme_slot(&self, slot: ColorMapSlot) -> ThemeColorSlot
pub const fn theme_slot(&self, slot: ColorMapSlot) -> ThemeColorSlot
Returns the concrete theme slot selected for one semantic map slot.
Sourcepub fn with_overrides(
&self,
overrides: &[(ColorMapSlot, ThemeColorSlot)],
) -> Self
pub fn with_overrides( &self, overrides: &[(ColorMapSlot, ThemeColorSlot)], ) -> Self
Returns a copy with only the named layout or slide overrides replaced.
Trait Implementations§
impl Eq for ColorMap
impl StructuralPartialEq for ColorMap
Auto Trait Implementations§
impl Freeze for ColorMap
impl RefUnwindSafe for ColorMap
impl Send for ColorMap
impl Sync for ColorMap
impl Unpin for ColorMap
impl UnsafeUnpin for ColorMap
impl UnwindSafe for ColorMap
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