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§
Sourcetype Color: PixelColor
type Color: PixelColor
Color type.
Required Methods§
Sourcefn draw_styled<D>(
&self,
style: &S,
target: &mut D,
) -> Result<Self::Output, D::Error>where
D: DrawTarget<Color = Self::Color>,
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", so this trait is not object safe.