pub trait BitGrid {
    fn size(&self) -> usize;
fn bit(&self, y: usize, x: usize) -> bool; fn write_grid_to(&self, p: &str) { ... } }
Expand description

A grid that contains exactly one QR code square.

The common trait for everything that can be decoded as a QR code. Given a normal image, we first need to find the QR grids in it.

This trait can be implemented when some object is known to be exactly the bit-pattern of a QR code.

Required methods

Return the size of the grid.

Since QR codes are always squares, the grid is assumed to be size * size.

Return the value of the bit at the given location.

true means ‘black’, false means ‘white’

Provided methods

Implementors