[][src]Function qr_code::ec::max_allowed_errors

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

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