pub struct StyleModifier {
pub foreground: Option<Color>,
pub background: Option<Color>,
pub font_style: Option<FontStyle>,
}
Expand description
A change to a Style
applied incrementally by a theme rule
Fields left empty (as None
) will not modify the corresponding field on a Style
Fields§
§foreground: Option<Color>
Foreground color
background: Option<Color>
Background color
font_style: Option<FontStyle>
Style of the font
Implementations§
Source§impl StyleModifier
impl StyleModifier
Sourcepub fn apply(&self, other: StyleModifier) -> StyleModifier
pub fn apply(&self, other: StyleModifier) -> StyleModifier
Applies the other modifier to this one, creating a new modifier.
Values in other
are preferred.
Trait Implementations§
Source§impl Clone for StyleModifier
impl Clone for StyleModifier
Source§fn clone(&self) -> StyleModifier
fn clone(&self) -> StyleModifier
Returns a copy 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 StyleModifier
impl Debug for StyleModifier
Source§impl Default for StyleModifier
impl Default for StyleModifier
Source§fn default() -> StyleModifier
fn default() -> StyleModifier
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StyleModifier
impl<'de> Deserialize<'de> for StyleModifier
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 StyleModifier
impl PartialEq for StyleModifier
Source§impl Serialize for StyleModifier
impl Serialize for StyleModifier
impl Copy for StyleModifier
impl Eq for StyleModifier
impl StructuralPartialEq for StyleModifier
Auto Trait Implementations§
impl Freeze for StyleModifier
impl RefUnwindSafe for StyleModifier
impl Send for StyleModifier
impl Sync for StyleModifier
impl Unpin for StyleModifier
impl UnwindSafe for StyleModifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.