fiscalprinter 1.0.6

A Fiscal Printer trait for implementation
Documentation

// use fiscalprinter::{FiscalPrinter, Setup, PrinterResult, Report, Document, DocumentAction, SetupAction, ReportAction};
// pub struct PnPTest {

// }

// impl FiscalPrinter for PnPTest {
//     fn new() -> Self {
//         PnPTest { }
//     }
//     fn open_port(&self, _port: String) -> bool {
//         println!("open_port {:?}" , _port);
//         let hola = true;
//         return hola;
//     }

//     fn send_command(&self, _command: String) -> bool {
//         println!("send_command {:?}" , _command);
//         let hola = true;
//         return hola;
//     }

//     fn close_port(&self) -> bool {
//         println!("close_port");
//         let hola = true;
//         return hola;
//     }

//     fn setup(&self, _setup: Setup) -> PrinterResult {
//         println!("setup");
//         PrinterResult { 
//             uuid: _setup.get_uuid(), 
//             printer_name: _setup.get_printer_name(), 
//             last_invoice_no: String::new(), 
//             last_credit_memo_no: String::new(), 
//             last_debit_memo_no: String::new(), 
//             last_non_fiscal_no: String::from("Last Non fiscal No"), 
//             last_closing_no: String::new() 
//         }
//     }

//     fn print_report(&self, _report: Report) -> PrinterResult {
//         println!("print_report");
//         PrinterResult { 
//             uuid: _report.get_uuid(), 
//             printer_name: _report.get_printer_name(), 
//             last_invoice_no: String::new(), 
//             last_credit_memo_no: String::from("Last Credit Memo No"), 
//             last_debit_memo_no: String::new(), 
//             last_non_fiscal_no: String::new(), 
//             last_closing_no: String::new() 
//         }
//     }

//     fn print_document(&self, _document: Document) -> PrinterResult {
//         println!("print_document");
//         PrinterResult { 
//             uuid: _document.get_uuid(), 
//             printer_name: _document.get_printer_name(), 
//             last_invoice_no: String::new(), 
//             last_credit_memo_no: String::new(), 
//             last_debit_memo_no: String::from("Last Debit Memo No"), 
//             last_non_fiscal_no: String::new(), 
//             last_closing_no: String::new() 
//         }
//     }
// }