pub trait ModuleSource {
// Required methods
fn get(&self, x: usize, y: usize) -> Color;
fn width(&self) -> usize;
fn height(&self) -> usize;
fn modules(&self) -> &[Color];
// Provided methods
fn row(&self, y: usize) -> &[Color] { ... }
fn is_empty(&self) -> bool { ... }
}Expand description
Read-only access to a QR module grid.
Coordinates are zero-based and exclude any quiet zone. Implementations should
store modules in row-major order when exposing modules.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".