pub trait RenderTemplate {
// Required methods
fn dark_color(&self) -> &str;
fn light_color(&self) -> &str;
fn module_size(&self) -> Option<(u32, u32)>;
fn quiet_zone(&self) -> bool;
}Expand description
Styling data that can be applied to a Renderer with
Renderer::template.
The facade crate implements this for its QrTemplate, while downstream
crates can provide their own lightweight template types without depending on
the facade.
Required Methods§
Sourcefn dark_color(&self) -> &str
fn dark_color(&self) -> &str
Dark module color as a CSS hex string.
Sourcefn light_color(&self) -> &str
fn light_color(&self) -> &str
Light module color as a CSS hex string.
Sourcefn module_size(&self) -> Option<(u32, u32)>
fn module_size(&self) -> Option<(u32, u32)>
Optional module dimensions (width, height).
Sourcefn quiet_zone(&self) -> bool
fn quiet_zone(&self) -> bool
Whether to include the quiet zone.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".