Skip to main content

StyledDrawable

Trait StyledDrawable 

Source
pub trait StyledDrawable<S> {
    type Color: PixelColor;
    type Output;

    // Required method
    fn draw_styled<D>(
        &self,
        style: &S,
        target: &mut D,
    ) -> Result<Self::Output, D::Error>
       where D: DrawTarget<Color = Self::Color>;
}
Expand description

Styled drawable.

Required Associated Types§

Source

type Color: PixelColor

Color type.

Source

type Output

Output type.

Required Methods§

Source

fn draw_styled<D>( &self, style: &S, target: &mut D, ) -> Result<Self::Output, D::Error>
where D: DrawTarget<Color = Self::Color>,

Draws the primitive using the given style.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§