pub struct SatoPrinter {
pub config: SatoConfig,
pub on_event: SharedEventHandler,
/* private fields */
}Expand description
SATO label printer (TCP/IP connection).
clone() is cheap – all runtime state is behind an Arc.
Fields§
§config: SatoConfig§on_event: SharedEventHandlerImplementations§
Source§impl SatoPrinter
impl SatoPrinter
pub fn new(config: SatoConfig) -> Self
pub fn from_map(data: HashMap<String, Value>) -> Self
pub fn with_event_handler(self, handler: SharedEventHandler) -> Self
pub fn set_event_handler(&mut self, handler: SharedEventHandler)
pub fn is_connected(&self) -> bool
pub fn can_print(&self) -> bool
pub fn pending_print_jobs(&self) -> usize
pub fn to_map(&self) -> ParamMap
pub fn connect_instruction(&self) -> String
pub async fn connect(&self)
pub async fn close(&self)
pub async fn print(&self, zpl: &str) -> Result<String, String>
pub async fn add_to_print_queue(&self, labels: Vec<String>)
pub async fn process_queue(&self)
Trait Implementations§
Source§impl Clone for SatoPrinter
impl Clone for SatoPrinter
Auto Trait Implementations§
impl Freeze for SatoPrinter
impl !RefUnwindSafe for SatoPrinter
impl Send for SatoPrinter
impl Sync for SatoPrinter
impl Unpin for SatoPrinter
impl UnsafeUnpin for SatoPrinter
impl !UnwindSafe for SatoPrinter
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