Struct cursive::theme::Style [−][src]
pub struct Style { pub effects: EnumSet<Effect>, pub color: Option<ColorStyle>, }
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: Option<ColorStyle>
Color style to apply.
None
to keep using the previous colors.
Methods
impl Style
[src]
impl Style
pub fn none() -> Self
[src]
pub fn none() -> Self
Returns a new Style
that doesn't apply anything.
pub fn merge(styles: &[Style]) -> Self
[src]
pub fn merge(styles: &[Style]) -> Self
Returns a new Style
by merging all given styles.
Will use the last non-None
color, and will combine all effects.
pub fn combine<S>(self, other: S) -> Self where
S: Into<Style>,
[src]
pub fn combine<S>(self, other: S) -> Self where
S: Into<Style>,
Returns a combination of self
and other
.
Trait Implementations
impl Clone for Style
[src]
impl Clone for Style
fn clone(&self) -> Style
[src]
fn clone(&self) -> Style
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Style
[src]
impl Copy for Style
impl Debug for Style
[src]
impl Debug for Style
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 Style
[src]
impl PartialEq for Style
fn eq(&self, other: &Style) -> bool
[src]
fn eq(&self, other: &Style) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Style) -> bool
[src]
fn ne(&self, other: &Style) -> bool
This method tests for !=
.
impl Eq for Style
[src]
impl Eq for Style
impl Default for Style
[src]
impl Default for Style
impl From<Effect> for Style
[src]
impl From<Effect> for Style
impl From<ColorStyle> for Style
[src]
impl From<ColorStyle> for Style
fn from(color: ColorStyle) -> Self
[src]
fn from(color: ColorStyle) -> Self
Performs the conversion.
impl From<Color> for Style
[src]
impl From<Color> for Style
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.
impl From<ColorType> for Style
[src]
impl From<ColorType> for Style