pub struct TableEntry { /* private fields */ }Expand description
An entry in the encoding table.
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 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TableEntry
impl Debug for TableEntry
Source§impl PartialEq for TableEntry
impl PartialEq for TableEntry
impl Copy for TableEntry
impl Eq for TableEntry
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 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