pub struct QRMatrix { /* private fields */ }Expand description
Wrapper around the QR code matrix providing efficient module access.
Implementations§
Source§impl QRMatrix
impl QRMatrix
Sourcepub fn new(data: &str, options: &QROptions) -> Result<Self>
pub fn new(data: &str, options: &QROptions) -> Result<Self>
Create a new QR matrix from data with the specified options.
Sourcepub fn module_count(&self) -> usize
pub fn module_count(&self) -> usize
Get the module count (same as size for compatibility).
Sourcepub fn is_dark_signed(&self, row: i32, col: i32) -> bool
pub fn is_dark_signed(&self, row: i32, col: i32) -> bool
Check if a module at (row, col) is dark, with signed coordinates. Returns false for out-of-bounds coordinates.
Sourcepub fn get_neighbor(
&self,
row: i32,
col: i32,
offset_x: i32,
offset_y: i32,
) -> bool
pub fn get_neighbor( &self, row: i32, col: i32, offset_x: i32, offset_y: i32, ) -> bool
Get neighbor state relative to a position.
Sourcepub fn is_finder_pattern(&self, row: usize, col: usize) -> bool
pub fn is_finder_pattern(&self, row: usize, col: usize) -> bool
Check if a position is part of a finder pattern (corner square). Finder patterns are 7x7 and located at:
- Top-left: (0, 0)
- Top-right: (0, size-7)
- Bottom-left: (size-7, 0)
Sourcepub fn is_finder_pattern_outer(&self, row: usize, col: usize) -> bool
pub fn is_finder_pattern_outer(&self, row: usize, col: usize) -> bool
Check if a position is part of a finder pattern’s outer square (7x7 border).
Sourcepub fn is_finder_pattern_inner(&self, row: usize, col: usize) -> bool
pub fn is_finder_pattern_inner(&self, row: usize, col: usize) -> bool
Check if a position is part of a finder pattern’s inner dot (3x3 center).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QRMatrix
impl RefUnwindSafe for QRMatrix
impl Send for QRMatrix
impl Sync for QRMatrix
impl Unpin for QRMatrix
impl UnsafeUnpin for QRMatrix
impl UnwindSafe for QRMatrix
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.