pub fn create_qr_code(
data: &str,
error_correction_level: ErrorCorrectionLevel,
) -> BitMapExpand description
Creates a QR code bitmap from input data with specified error correction
This function generates a complete QR code bitmap by performing the following steps:
- Analyze the input data to determine the appropriate encoding mode
- Encode the data into a bitstring
- Generate error correction codes
- Structure the data and error correction codewords
- Create the final QR code bitmap
§Arguments
data- The string data to be encoded in the QR codeerror_correction_level- The error correction level for redundancy and recovery
§Returns
A BitMap representing the fully generated QR code
§Errors
Panics if the data cannot be encoded or exceeds QR code capacity
§Examples
use qr_code::{create_qr_code, ErrorCorrectionLevel};
let qr_code = create_qr_code("HELLO, WORLD!", ErrorCorrectionLevel::Q);§Performance
The function’s complexity depends on the data length and chosen error correction level