Skip to main content

FigureDrawer

Trait FigureDrawer 

Source
pub trait FigureDrawer {
    // Required method
    fn draw<F>(
        &self,
        x: f64,
        y: f64,
        size: f64,
        get_neighbor: Option<F>,
    ) -> String
       where F: Fn(i32, i32) -> bool;
}
Expand description

Trait for drawing QR code figures.

Required Methods§

Source

fn draw<F>(&self, x: f64, y: f64, size: f64, get_neighbor: Option<F>) -> String
where F: Fn(i32, i32) -> bool,

Draw the figure and return SVG element string.

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.

Implementors§