pub struct QrStyle {
pub module_shape: ModuleShape,
pub finder_shape: FinderShape,
pub fg_color: Color,
pub bg_color: Color,
pub module_size: u32,
pub quiet_zone: u32,
}Expand description
Styling options for QR code SVG rendering.
All fields have sensible defaults via Default:
| Field | Default |
|---|---|
module_shape | RoundedSquare { radius: 0.3 } |
finder_shape | Rounded |
fg_color | Hex("#000000") (black) |
bg_color | Hex("#ffffff") (white) |
module_size | 10 |
quiet_zone | 4 |
§Example
use modo::qrcode::{QrStyle, ModuleShape, FinderShape, Color};
let style = QrStyle {
module_shape: ModuleShape::Circle,
finder_shape: FinderShape::Circle,
fg_color: Color::Rgb(26, 26, 46),
..Default::default()
};Fields§
§module_shape: ModuleShapeShape of individual data modules.
finder_shape: FinderShapeShape of the three finder patterns (corner markers).
fg_color: ColorForeground (dark module) color. Default: black (#000000).
bg_color: ColorBackground color. Default: white (#ffffff).
module_size: u32Size of each module in SVG units. Default: 10.
quiet_zone: u32Number of quiet-zone modules around the QR code. Default: 4
(the spec-recommended minimum).
Trait Implementations§
impl StructuralPartialEq for QrStyle
Auto Trait Implementations§
impl Freeze for QrStyle
impl RefUnwindSafe for QrStyle
impl Send for QrStyle
impl Sync for QrStyle
impl Unpin for QrStyle
impl UnsafeUnpin for QrStyle
impl UnwindSafe for QrStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more