Skip to main content

TextStyleExt

Trait TextStyleExt 

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§

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

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§

§

impl TextStyleExt for SelectableText

§

fn get_text_style_data(&mut self) -> &mut TextStyleData

Implementors§