Struct thermal_printer::ThermalPrinter
source · Expand description
ThermalPrinter wraps a serial port to provide a high-level abstraction over the printers serial protocol.
Implementations
sourceimpl<T> ThermalPrinter<T>where
T: Write<u8>,
impl<T> ThermalPrinter<T>where
T: Write<u8>,
sourcepub fn new(port: T) -> ThermalPrinter<T>
pub fn new(port: T) -> ThermalPrinter<T>
Creates a new thermal priner on the given port, with the default settings
Once you have successfully connected to the printer you can update these settings using configure
pub fn configure(
&mut self,
dots: u8,
time: u8,
interval: u8
) -> Result<(), T::Error>
Trait Implementations
sourceimpl<T: Clone> Clone for ThermalPrinter<T>where
T: Write<u8>,
impl<T: Clone> Clone for ThermalPrinter<T>where
T: Write<u8>,
sourcefn clone(&self) -> ThermalPrinter<T>
fn clone(&self) -> ThermalPrinter<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<T> Default<u8> for ThermalPrinter<T>where
T: Write<u8>,
Auto Trait Implementations
impl<T> RefUnwindSafe for ThermalPrinter<T>where
T: RefUnwindSafe,
impl<T> Send for ThermalPrinter<T>where
T: Send,
impl<T> Sync for ThermalPrinter<T>where
T: Sync,
impl<T> Unpin for ThermalPrinter<T>where
T: Unpin,
impl<T> UnwindSafe for ThermalPrinter<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more