Struct cursive_core::theme::Style
source · pub struct Style {
pub effects: EnumSet<Effect>,
pub color: ColorStyle,
}
Expand description
Combine a color and an effect.
Represents any transformation that can be applied to text.
Fields§
§effects: EnumSet<Effect>
Effect to apply.
None
to keep using previous effects.
color: ColorStyle
Color style to apply.
None
to keep using the previous colors.
Implementations§
Trait Implementations§
source§impl From<ColorStyle> for Style
impl From<ColorStyle> for Style
source§fn from(color: ColorStyle) -> Self
fn from(color: ColorStyle) -> Self
Converts to this type from the input type.
source§impl From<PaletteColor> for Style
impl From<PaletteColor> for Style
source§fn from(color: PaletteColor) -> Self
fn from(color: PaletteColor) -> Self
Converts to this type from the input type.
source§impl<'a> FromIterator<&'a Style> for Style
impl<'a> FromIterator<&'a Style> for Style
Creates a new Style
by merging all given styles.
Will use the last non-None
color, and will combine all effects.
source§impl<T: Into<Style>> FromIterator<T> for Style
impl<T: Into<Style>> FromIterator<T> for Style
Creates a new Style
by merging all given styles.
Will use the last non-None
color, and will combine all effects.