pub trait StyledPixel: Pixel {
// Required method
fn from_hex(hex: &str) -> Self;
}Expand description
A Pixel constructible from a CSS-style hex color string ("#rrggbb" or
"#rgb"), used by Renderer::template to apply a QrTemplate.
Implemented for the owned, styled backends (image RGB/RGBA, EPS, PDF, ANSI).
The borrowing backends (svg::Color, html::Color) are not StyledPixel
because their color borrows from the input and can’t be stored generically;
apply those colors manually instead.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".