[][src]Struct text_style::Effects

pub struct Effects {
    pub is_bold: bool,
    pub is_italic: bool,
    pub is_underline: bool,
}

A set of text effects.

Fields

is_bold: bool

Whether the bold text effect is set.

is_italic: bool

Whether the italic text effect is set.

is_underline: bool

Whether the underline text effect is set.

Implementations

impl Effects[src]

pub fn new() -> Effects[src]

Creates an empty set of text effects.

pub fn empty() -> Effects[src]

Creates an empty set of text effects.

pub fn only(effect: Effect) -> Effects[src]

Creates a set of text effects with only the given effect.

pub fn set(&mut self, effect: Effect, set: bool)[src]

Sets or unsets the given text effect.

pub fn is_set(&self, effect: Effect) -> bool[src]

Checks whether the given effect is set.

pub fn and(&self, other: Effects) -> Effects[src]

Combines this set of text effects with another set of text effects.

pub fn is_empty(&self) -> bool[src]

Checks whether this set of text effects is empty.

Trait Implementations

impl Clone for Effects[src]

impl Copy for Effects[src]

impl Debug for Effects[src]

impl Default for Effects[src]

impl From<Effect> for Effects[src]

impl From<Effects> for Attributes[src]

impl From<Effects> for Style[src]

impl From<Effects> for EffectsIter[src]

impl From<FontStyle> for Effects[src]

impl FromIterator<Effect> for Effects[src]

impl IntoIterator for Effects[src]

type Item = Effect

The type of the elements being iterated over.

type IntoIter = EffectsIter

Which kind of iterator are we turning this into?

impl PartialEq<Effects> for Effects[src]

impl StructuralPartialEq for Effects[src]

Auto Trait Implementations

impl RefUnwindSafe for Effects

impl Send for Effects

impl Sync for Effects

impl Unpin for Effects

impl UnwindSafe for Effects

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> With for T