escposify 0.6.2

A ESC/POS driver for Rust ## Minimum Rust version policy (MSRV) This crate's minimum supported rustc version is 1.46.0.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fs::File;
use std::io;

use escposify::printer::Printer;

fn main() -> io::Result<()> {
    let device_file = File::options().append(true).open("/dev/usb/lp0").unwrap();

    let file = escposify::device::File::from(device_file);
    let mut printer = Printer::new(file, None, None);

    printer
        .chain_size(0, 0)?
        .chain_text("The quick brown fox jumps over the lazy dog")?
        .chain_feed(1)?
        .chain_cut(false)?
        .flush()
}