Skip to main content

Module qr_code

Module qr_code 

Source
Expand description

VAPP-162: the QrCode native’s MATRIX (catalog/style.json qrCode). A faithful Rust port of Project Nayuki’s QR Code generator library (https://www.nayuki.io/page/qr-code-generator-library, MIT licence, Copyright (c) Project Nayuki; the notice is in docs/third-party-licences.md and packages/exponential-ui/vendor/nayuki-qr/LICENSE.txt), mirroring the TS reference src/qr-code.ts: ONE byte-mode segment over the value’s UTF-8 bytes, the smallest version 1–40 that fits, the given error correction level kept exact (no boostEcl), the mask with the lowest penalty. fixtures/qr-code.json locks every matrix bit.

Copyright (c) Project Nayuki. MIT License: the full notice ships in packages/exponential-ui/vendor/nayuki-qr/LICENSE.txt and every client’s NOTICES.

Structs§

QrCodeSpec
style.json qrCode: the painted geometry’s constants.
QrMatrix
size rows of size characters: ‘1’ = dark, ‘0’ = light; no quiet zone.

Enums§

QrLevel
The error correction level (catalog enum): anything else is M.

Statics§

QR_CODE

Functions§

qr_layout
The painted geometry of a QrCode of edge size px: (module edge, quiet zone inset), both px, fractional (painters snap module EDGES).
qr_matrix
The QR matrix of value (UTF-8, byte mode) at level; None for an empty value or one too long for version 40 at that level.
qr_version
The smallest version whose data capacity holds byte_len bytes at level.