pub struct DataMatrix;Expand description
Data Matrix ECC 200 barcode encoder.
Encodes text input into a square Data Matrix symbol. The smallest symbol that fits the data is automatically selected (10×10 to 48×48).
§Example
use barcodes::common::traits::BarcodeEncoder;
use barcodes::common::types::Encoded;
use barcodes::twod::datamatrix::DataMatrix;
let mut buf = [false; 48 * 48];
let Encoded::Matrix { width, height } = DataMatrix::encode_into("Hello DM", &mut buf).unwrap()
else { unreachable!() };
assert_eq!(width, height);Trait Implementations§
Source§impl BarcodeEncoder for DataMatrix
impl BarcodeEncoder for DataMatrix
Source§fn encode_into(input: &str, buf: &mut [bool]) -> Result<Encoded, EncodeError>
fn encode_into(input: &str, buf: &mut [bool]) -> Result<Encoded, EncodeError>
Source§fn symbology_name() -> &'static str
fn symbology_name() -> &'static str
Return the human-readable name of this symbology (e.g.
"EAN-13").Source§fn encode(input: &Self::Input) -> Result<BarcodeOutput, EncodeError>
fn encode(input: &Self::Input) -> Result<BarcodeOutput, EncodeError>
Auto Trait Implementations§
impl Freeze for DataMatrix
impl RefUnwindSafe for DataMatrix
impl Send for DataMatrix
impl Sync for DataMatrix
impl Unpin for DataMatrix
impl UnsafeUnpin for DataMatrix
impl UnwindSafe for DataMatrix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more