Skip to main content

TextStyle

Trait TextStyle 

Source
pub trait TextStyle {
    // Required methods
    fn color(self, c: Color) -> View;
    fn size(self, px: f32) -> View;
    fn max_lines(self, n: usize) -> View;
    fn single_line(self) -> View;
    fn overflow_ellipsize(self) -> View;
    fn overflow_clip(self) -> View;
    fn overflow_visible(self) -> View;
    fn font_family(self, family: &'static str) -> View;
}
Expand description

Method styling

Required Methods§

Source

fn color(self, c: Color) -> View

Source

fn size(self, px: f32) -> View

Source

fn max_lines(self, n: usize) -> View

Source

fn single_line(self) -> View

Source

fn overflow_ellipsize(self) -> View

Source

fn overflow_clip(self) -> View

Source

fn overflow_visible(self) -> View

Source

fn font_family(self, family: &'static str) -> View

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TextStyle for View

Source§

fn color(self, c: Color) -> View

Source§

fn size(self, dp_font: f32) -> View

Source§

fn max_lines(self, n: usize) -> View

Source§

fn single_line(self) -> View

Source§

fn overflow_ellipsize(self) -> View

Source§

fn overflow_clip(self) -> View

Source§

fn overflow_visible(self) -> View

Source§

fn font_family(self, family: &'static str) -> View

Implementors§