qrcode::ec

Function max_allowed_errors

Source
pub fn max_allowed_errors(
    version: Version,
    ec_level: EcLevel,
) -> QrResult<usize>
Expand description

Computes the maximum allowed number of erratic modules can be introduced to the QR code, before the data becomes truly corrupted.

ยงErrors

Returns Err(QrError::InvalidVersion) if it is not valid to use the ec_level for the given version (e.g. Version::Micro(1) with EcLevel::H).