Skip to main content

Crate url2qr

Crate url2qr 

Source
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.