Migrating from PHP

laravel-rust-barcode Alpha Laravel for Rust

Map milon/barcode's linear SVG and HTML calls to the Rust encoder and renderer.

PHPRust
Type stringtype_name.parse::<Linear>()? accepts the same names without regard to ASCII case
getBarcodeSVGkind.encode(code)?.svg(label, inline, options)?
getBarcodeHTMLkind.encode(code)?.html(label, options)?
setPaddingLinearRenderOptions::new().padding(pixels)

Code 39 Full ASCII (C39E, C39E+) preserves lowercase letters and encodes the vertical tab byte 0x0B. Plain Code 39 continues to uppercase ASCII letters.

Code 93 preserves lowercase and the vertical tab as well. Codabar preserves a caller-supplied start or stop letter and supplies A at a missing end. Interior delimiter letters are rejected.

Industrial and Interleaved 2 of 5 require at least one digit, with or without a check digit.

Matrix PNG files use the same bounds and pixels as the in-memory renderer, without PHP's edge overdraw. Invalid QR error-correction levels return an error instead of falling back.

Single-track Pharmacode returns an error for zero, negative, non-numeric or out-of-range values instead of producing a blank symbol.