Skip to main content

TextStyleExt

Trait TextStyleExt 

Source
pub trait TextStyleExt: Sized {
Show 13 methods // Required method fn get_text_style_data(&mut self) -> &mut TextStyleData; // Provided methods fn text_style(self, data: TextStyleData) -> Self { ... } fn color(self, color: impl Into<Color>) -> Self { ... } fn text_align(self, text_align: impl Into<TextAlign>) -> Self { ... } fn font_size(self, font_size: impl Into<FontSize>) -> Self { ... } fn font_family(self, font_family: impl Into<Cow<'static, str>>) -> Self { ... } fn font_slant(self, font_slant: impl Into<FontSlant>) -> Self { ... } fn font_weight(self, font_weight: impl Into<FontWeight>) -> Self { ... } fn font_width(self, font_width: impl Into<FontWidth>) -> Self { ... } fn text_height(self, text_height: impl Into<TextHeightBehavior>) -> Self { ... } fn text_overflow(self, text_overflow: impl Into<TextOverflow>) -> Self { ... } fn text_shadow(self, text_shadow: impl Into<TextShadow>) -> Self { ... } fn text_decoration(self, text_decoration: impl Into<TextDecoration>) -> Self { ... }
}

Required Methods§

Provided Methods§

Source

fn text_style(self, data: TextStyleData) -> Self

Source

fn color(self, color: impl Into<Color>) -> Self

Source

fn text_align(self, text_align: impl Into<TextAlign>) -> Self

Source

fn font_size(self, font_size: impl Into<FontSize>) -> Self

Source

fn font_family(self, font_family: impl Into<Cow<'static, str>>) -> Self

Source

fn font_slant(self, font_slant: impl Into<FontSlant>) -> Self

Source

fn font_weight(self, font_weight: impl Into<FontWeight>) -> Self

Source

fn font_width(self, font_width: impl Into<FontWidth>) -> Self

Source

fn text_height(self, text_height: impl Into<TextHeightBehavior>) -> Self

Source

fn text_overflow(self, text_overflow: impl Into<TextOverflow>) -> Self

Source

fn text_shadow(self, text_shadow: impl Into<TextShadow>) -> Self

Source

fn text_decoration(self, text_decoration: impl Into<TextDecoration>) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TextStyleExt for SelectableText

Implementors§