pub enum Encoded {
Linear(LinearPattern),
Matrix(BitMatrix),
Postal4State(Postal4Pattern),
Stacked(StackedPattern),
Dots(DotMatrix),
Hex(Box<MaxiCodeSymbol>),
ColorMatrix(ColorMatrix),
}Expand description
Output of encoding a barcode payload.
Variants§
Linear(LinearPattern)
One-dimensional barcode: a run-length stream of bar widths in modules.
Matrix(BitMatrix)
Two-dimensional barcode: a black/white grid of modules.
Postal4State(Postal4Pattern)
4-state postal code: each character produces one bar of one of four vertical shapes (full / ascender / descender / tracker), separated by fixed-width gaps. Used by Royal Mail, KIX, Japan Post, DAFT, etc.
Stacked(StackedPattern)
Stacked / multi-row 1D barcode: each row is its own LinearPattern
drawn beneath the previous one, with a fixed-height row separator.
Used by Codablock-F, PDF417, GS1 DataBar Stacked, and the
composite-code 2D companion.
Dots(DotMatrix)
2D dot-matrix barcode: a sparse pattern of dots on a parity grid. Each “on” cell is rendered as a round dot rather than a square module — the defining visual feature of DotCode.
Hex(Box<MaxiCodeSymbol>)
MaxiCode hexagonal symbol — a fixed 33×30 cell grid where
odd-numbered rows are physically offset by half a module to
the right, producing a hex-packed layout. Boxed because the
inline [bool; 990] cells array dwarfs the other variants.
ColorMatrix(ColorMatrix)
Multi-colour 2D matrix barcode — each cell carries a palette
index 0..=7 rather than a single bit. Currently used by
Ultracode, which uses an 8-entry palette of CMYWK colours
(white, cyan, magenta, yellow, green, blue, red, black per
the AIM USS Ultracode spec). The renderer emits one coloured
rect per cell in SVG / one RGB byte per pixel in PNG.