pub struct TableEntry {
pub a: BarcodeValue,
pub b: BarcodeValue,
pub c: BarcodeValue,
/* private fields */
}Expand description
An entry in the encoding table.
Fields§
§a: BarcodeValueThe value with Barcode Set A selected
b: BarcodeValueThe value with Barcode Set B selected
c: BarcodeValueThe value with Barcode Set C selected
Implementations§
Source§impl TableEntry
impl TableEntry
Sourcepub fn new(
value: u8,
a: impl Into<BarcodeValue>,
b: impl Into<BarcodeValue>,
c: impl Into<BarcodeValue>,
latin: char,
) -> Self
pub fn new( value: u8, a: impl Into<BarcodeValue>, b: impl Into<BarcodeValue>, c: impl Into<BarcodeValue>, latin: char, ) -> Self
create a new table entry
Sourcepub fn barcode_bits(&self) -> u32
pub fn barcode_bits(&self) -> u32
the bits used to encode the value on a normal barcode
Sourcepub fn barcode_runs(&self) -> &'static str
pub fn barcode_runs(&self) -> &'static str
the runs for the code
A run of 1231 would mean 1001110 in binary
Trait Implementations§
Source§impl Clone for TableEntry
impl Clone for TableEntry
Source§fn clone(&self) -> TableEntry
fn clone(&self) -> TableEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TableEntry
Source§impl Debug for TableEntry
impl Debug for TableEntry
impl Eq for TableEntry
Source§impl PartialEq for TableEntry
impl PartialEq for TableEntry
Source§fn eq(&self, other: &TableEntry) -> bool
fn eq(&self, other: &TableEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TableEntry
Auto Trait Implementations§
impl Freeze for TableEntry
impl RefUnwindSafe for TableEntry
impl Send for TableEntry
impl Sync for TableEntry
impl Unpin for TableEntry
impl UnsafeUnpin for TableEntry
impl UnwindSafe for TableEntry
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