escpos_db

Struct Features

source
pub struct Features(/* private fields */);
Expand description

The specific ESC/POS features that are supported by a printer profile.

Implementations§

source§

impl Features

source

pub fn barcode_a(&self) -> bool

Check if the barcodeA feature is supported.

source

pub fn barcode_b(&self) -> bool

Check if the barcodeB feature is supported.

source

pub fn bit_image_column(&self) -> bool

Check if the bitImageColumn feature is supported.

source

pub fn bit_image_raster(&self) -> bool

Check if the bitImageRaster feature is supported.

source

pub fn graphics(&self) -> bool

Check if the graphics feature is supported.

source

pub fn high_density(&self) -> bool

Check if the highDensity feature is supported.

source

pub fn paper_full_cut(&self) -> bool

Check if the paperFullCut feature is supported.

source

pub fn paper_part_cut(&self) -> bool

Check if the paperPartCut feature is supported.

source

pub fn pdf417_code(&self) -> bool

Check if the pdf417Code feature is supported.

source

pub fn pulse_bel(&self) -> bool

Check if the pulseBel feature is supported.

source

pub fn pulse_standard(&self) -> bool

Check if the pulseStandard feature is supported.

source

pub fn qr_code(&self) -> bool

Check if the qrCode feature is supported.

source

pub fn star_commands(&self) -> bool

Check if the starCommands feature is supported.

source§

impl Features

source

pub const fn new() -> Self

Create a new Features with no features enabled.

source

pub fn with_barcode_a(self, on: bool) -> Self

Set the barcodeA feature to be on or off.

source

pub fn with_barcode_b(self, on: bool) -> Self

Set the barcodeB feature to be on or off.

source

pub fn with_bit_image_column(self, on: bool) -> Self

Set the bitImageColumn feature to be on or off.

source

pub fn with_bit_image_raster(self, on: bool) -> Self

Set the bitImageRaster feature to be on or off.

source

pub fn with_graphics(self, on: bool) -> Self

Set the graphics feature to be on or off.

source

pub fn with_high_density(self, on: bool) -> Self

Set the highDensity feature to be on or off.

source

pub fn with_paper_full_cut(self, on: bool) -> Self

Set the paperFullCut feature to be on or off.

source

pub fn with_paper_part_cut(self, on: bool) -> Self

Set the paperPartCut feature to be on or off.

source

pub fn with_pdf417_code(self, on: bool) -> Self

Set the pdf417Code feature to be on or off.

source

pub fn with_pulse_bel(self, on: bool) -> Self

Set the pulseBel feature to be on or off.

source

pub fn with_pulse_standard(self, on: bool) -> Self

Set the pulseStandard feature to be on or off.

source

pub fn with_qr_code(self, on: bool) -> Self

Set the qrCode feature to be on or off.

source

pub fn with_star_commands(self, on: bool) -> Self

Set the starCommands feature to be on or off.

Trait Implementations§

source§

impl Clone for Features

source§

fn clone(&self) -> Features

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Features

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Features

source§

fn default() -> Features

Returns the “default value” for a type. Read more
source§

impl Copy for Features

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.