plotters::style

Trait IntoTextStyle

Source
pub trait IntoTextStyle<'a> {
    // Required method
    fn into_text_style<P: HasDimension>(self, parent: &P) -> TextStyle<'a>;

    // Provided methods
    fn with_color<C: Color>(self, color: C) -> TextStyleBuilder<'a, Self>
       where Self: Sized { ... }
    fn with_anchor<C: Color>(self, pos: Pos) -> TextStyleBuilder<'a, Self>
       where Self: Sized { ... }
}

Required Methods§

Source

fn into_text_style<P: HasDimension>(self, parent: &P) -> TextStyle<'a>

Provided Methods§

Source

fn with_color<C: Color>(self, color: C) -> TextStyleBuilder<'a, Self>
where Self: Sized,

Source

fn with_anchor<C: Color>(self, pos: Pos) -> TextStyleBuilder<'a, Self>
where Self: Sized,

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 IntoTextStyle<'static> for f64

Source§

fn into_text_style<P: HasDimension>(self, _: &P) -> TextStyle<'static>

Source§

impl IntoTextStyle<'static> for u32

Source§

fn into_text_style<P: HasDimension>(self, _: &P) -> TextStyle<'static>

Source§

impl<'a> IntoTextStyle<'a> for &'a str

Source§

fn into_text_style<P: HasDimension>(self, _: &P) -> TextStyle<'a>

Source§

impl<'a, F: Into<FontFamily<'a>>, T: SizeDesc> IntoTextStyle<'a> for (F, T, FontStyle)

Source§

fn into_text_style<P: HasDimension>(self, parent: &P) -> TextStyle<'a>

Source§

impl<'a, F: Into<FontFamily<'a>>, T: SizeDesc> IntoTextStyle<'a> for (F, T)

Source§

fn into_text_style<P: HasDimension>(self, parent: &P) -> TextStyle<'a>

Source§

impl<'a, F: Into<FontFamily<'a>>, T: SizeDesc, C: Color> IntoTextStyle<'a> for (F, T, FontStyle, &'a C)

Source§

fn into_text_style<P: HasDimension>(self, parent: &P) -> TextStyle<'a>

Source§

impl<'a, F: Into<FontFamily<'a>>, T: SizeDesc, C: Color> IntoTextStyle<'a> for (F, T, &'a C)

Source§

fn into_text_style<P: HasDimension>(self, parent: &P) -> TextStyle<'a>

Source§

impl<'a, T: Color> IntoTextStyle<'a> for &'a T

Source§

fn into_text_style<P: HasDimension>(self, _: &P) -> TextStyle<'a>

Implementors§

Source§

impl<'a> IntoTextStyle<'a> for FontFamily<'a>

Source§

impl<'a> IntoTextStyle<'a> for FontDesc<'a>

Source§

impl<'a> IntoTextStyle<'a> for TextStyle<'a>