papermint 0.3.0

High-performance, type-safe thermal receipt printing for Rust, Node.js & Mobile
Documentation
// papermint — High-performance, type-safe thermal receipt printing for Rust, Node.js & Mobile.
//
// Three-layer architecture:
//   Layer 3 (Layout)    → Receipt builder produces Vec<Command>
//   Layer 2 (Encoder)   → Dialect trait translates Command → raw bytes
//   Layer 1 (Transport) → Sends bytes to hardware (TCP, USB, Serial, etc.)

pub mod charset;
pub mod codepage;
pub mod command;
pub mod encoder;
pub mod error;
pub mod status;

pub mod dialect;

pub mod layout;
pub mod tax;

#[cfg(feature = "async")]
pub mod transport;

#[cfg(feature = "async")]
pub mod printer;

// Re-exports
pub use charset::InternationalCharset;
pub use codepage::CodePage;
pub use command::*;
pub use encoder::Encoder;
pub use error::PapermintError;
pub use status::{CoverStatus, DrawerStatus, PaperStatus, PrinterStatus};
pub use tax::{ZatcaInvoice, base64_decode, base64_encode, encode_zatca_tlv, zatca_qr_base64};

#[cfg(feature = "escpos")]
pub use dialect::escpos::EscPos;

#[cfg(feature = "star")]
pub use dialect::star::Star;

pub use layout::column::{ColumnWidth, PaperWidth, TableColumn};
pub use layout::preview::{render_html, render_svg};
pub use layout::receipt::Receipt;

#[cfg(feature = "async")]
pub use printer::Printer;

#[cfg(feature = "tcp")]
pub use transport::tcp::TcpTransport;

#[cfg(feature = "serial")]
pub use transport::serial::SerialTransport;

#[cfg(feature = "usb")]
pub use transport::usb::{UsbPrinterInfo, UsbTransport};

#[cfg(feature = "async")]
pub use transport::vec_sink::VecSink;

#[cfg(feature = "label")]
pub use papermint_label as label;

#[cfg(feature = "image")]
pub mod image;

#[cfg(feature = "image")]
pub use self::image::DitherMode;