pub trait TextStyleExtwhere
Self: Sized,{
// Required method
fn get_text_style_data(&mut self) -> &mut TextStyleData;
// Provided methods
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 { ... }
}Required Methods§
fn get_text_style_data(&mut self) -> &mut TextStyleData
Provided Methods§
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
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.