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
sourceimpl From<ColorStyle> for Style
impl From<ColorStyle> for Style
sourcefn from(color: ColorStyle) -> Style
fn from(color: ColorStyle) -> Style
Converts to this type from the input type.
sourceimpl From<PaletteColor> for Style
impl From<PaletteColor> for Style
sourcefn from(color: PaletteColor) -> Style
fn from(color: PaletteColor) -> Style
Converts to this type from the input type.
sourceimpl<'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.
sourceimpl<T> FromIterator<T> for Style where
T: Into<Style>,
impl<T> FromIterator<T> for Style where
T: Into<Style>,
Creates a new Style
by merging all given styles.
Will use the last non-None
color, and will combine all effects.
sourcefn from_iter<I>(iter: I) -> Style where
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> Style where
I: IntoIterator<Item = T>,
Creates a value from an iterator. Read more
impl Copy for Style
impl Eq for Style
impl StructuralEq for Style
impl StructuralPartialEq for Style
Auto Trait Implementations
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more