pub trait ModuleStorage {
// Required methods
fn get(&self, x: usize, y: usize) -> Color;
fn set(&mut self, x: usize, y: usize, color: Color);
fn width(&self) -> usize;
fn height(&self) -> usize;
fn modules(&self) -> &[Color];
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Read/write access to a QR module grid.
Rendering and inspection APIs should prefer ModuleSource when they only
need read access. This trait remains available for in-place mutation and
testing utilities.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".