Skip to main content

EmapiPrinter

Struct EmapiPrinter 

Source
pub struct EmapiPrinter<C> { /* private fields */ }

Implementations§

Source§

impl<C> EmapiPrinter<C>
where C: EmapiConnection,

Source

pub fn new(connection: C) -> Self

Source

pub fn with_timeout(self, timeout: Duration) -> Self

Source

pub fn with_max_retries(self, max_retries: usize) -> Result<Self>

Source

pub fn with_mtu(self, mtu: usize) -> Result<Self>

Source

pub fn with_fallback_mtu(self, fallback_mtu: usize) -> Result<Self>

Source

pub fn reports(&self) -> &[EmapiReport]

Source

pub fn read_report(&mut self) -> Result<EmapiReport>

Source

pub fn into_inner(self) -> C

Source

pub fn query_device_info(&mut self) -> Result<EmapiPrinterInfo>

Source

pub fn sleep_shutdown(&mut self) -> Result<()>

Source

pub fn set_shutdown_time(&mut self, minutes: u16) -> Result<()>

Source

pub fn query_rfid_uid(&mut self) -> Result<String>

Source

pub fn query_rfid_card_info(&mut self) -> Result<EmapiRfidCardInfo>

Source

pub fn query_rfid_paper_length(&mut self) -> Result<u32>

Source

pub fn set_rfid_auth_failure_handling( &mut self, policy: EmapiRfidAuthFailurePolicy, ) -> Result<()>

Source

pub fn set_wifi_config( &mut self, ssid: &str, password: &str, encryption_method: Option<u8>, ) -> Result<()>

Source

pub fn query_wifi_connection_state( &mut self, ) -> Result<EmapiWifiConnectionState>

Source

pub fn query_wifi_hotspot_info(&mut self) -> Result<EmapiWifiHotspotInfo>

Source

pub fn start_wifi_file_download( &mut self, file_type: u16, total_size: u32, ) -> Result<()>

Source

pub fn transfer_wifi_file_download_chunk( &mut self, index: u32, data: &[u8], ) -> Result<()>

Source

pub fn finish_wifi_file_download(&mut self) -> Result<()>

Source

pub fn query_printer_params(&mut self) -> Result<EmapiPrinterParams>

Source

pub fn query_print_status(&mut self) -> Result<EmapiPrintStatus>

Source

pub fn print_self_test_page(&mut self) -> Result<()>

Source

pub fn start_main_controller_ota( &mut self, file_type: u16, total_size: u32, ) -> Result<()>

Source

pub fn start_main_controller_ota_default( &mut self, total_size: u32, ) -> Result<()>

Source

pub fn transfer_main_controller_ota_chunk( &mut self, index: u32, data: &[u8], ) -> Result<()>

Source

pub fn finish_main_controller_ota(&mut self) -> Result<()>

Source

pub fn upgrade_main_controller(&mut self) -> Result<()>

Source

pub fn print_esc(&mut self, data: &[u8]) -> Result<()>

Source§

impl<D> EmapiPrinter<ConnectedDeviceEmapiConnection<D>>
where D: ConnectedDevice,

Source

pub fn connected_device(device: D) -> Self

Auto Trait Implementations§

§

impl<C> Freeze for EmapiPrinter<C>
where C: Freeze,

§

impl<C> RefUnwindSafe for EmapiPrinter<C>
where C: RefUnwindSafe,

§

impl<C> Send for EmapiPrinter<C>
where C: Send,

§

impl<C> Sync for EmapiPrinter<C>
where C: Sync,

§

impl<C> Unpin for EmapiPrinter<C>
where C: Unpin,

§

impl<C> UnsafeUnpin for EmapiPrinter<C>
where C: UnsafeUnpin,

§

impl<C> UnwindSafe for EmapiPrinter<C>
where C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.