Expand description
QR code generator optimized for URLs.
Byte mode, EC-L, versions 1-6, fixed mask pattern. Supports up to 134 character URLs.
§Usage
use url2qr::{generate_qr, qr_to_terminal};
let matrix = generate_qr("https://example.com").unwrap();
let output = qr_to_terminal("https://example.com", 4, false).unwrap();
println!("{output}");Enums§
- Error
- Errors returned by QR code generation.
Functions§
- encode_
data - Encode URL data into codewords with Reed-Solomon error correction.
- generate_
qr - Generate a QR code matrix for the given URL.
- qr_
to_ terminal - Generate a terminal-printable QR code using Unicode half-block characters.
- select_
version - Select the smallest QR version (1-6) that fits the given URL.