escpos_md/command/
code_table.rs

1/// Possible character sets
2#[derive(Clone, Debug, Copy, PartialEq, Eq)]
3pub enum CodeTable {
4    USA,
5    Latin2,
6}
7
8impl CodeTable {
9    /// Returns the byte representation of the esc/pos command
10    pub fn as_bytes(&self) -> Vec<u8> {
11        match self {
12            CodeTable::USA => vec![0x00],
13            CodeTable::Latin2 => vec![0x02],
14        }
15    }
16}