Function datamatrix::encode[][src]

pub fn encode(
    data: &[u8],
    symbol_size: SymbolSize
) -> Result<Bitmap<bool>, DataEncodingError>

Encode data as a Data Matrix (ECC200).

Please read the module documentation for some charset notes. If you did that and your input can be represented with the Latin 1 charset you may use the conversion function in the data module. If you only use printable ASCII you can just pass the data as is.

If the data does not fit into the given size encoding will fail. The encoder can automatically pick the smallest size which fits the data (see SymbolSize) but there is an upper limit.