Struct rxing::oned::Code39Reader
source · pub struct Code39Reader { /* private fields */ }Expand description
Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.
@author Sean Owen @see Code93Reader
Implementations§
source§impl Code39Reader
impl Code39Reader
pub const ALPHABET_STRING: &'static str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"
sourcepub const CHARACTER_ENCODINGS: [u32; 43] = _
pub const CHARACTER_ENCODINGS: [u32; 43] = _
These represent the encodings of characters, as patterns of wide and narrow bars. The 9 least-significant bits of each int correspond to the pattern of wide and narrow, with 1s representing “wide” and 0s representing narrow.
pub const ASTERISK_ENCODING: u32 = 148u32
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a reader that assumes all encoded data is data, and does not treat the final character as a check digit. It will not decoded “extended Code 39” sequences.
sourcepub fn with_use_check_digit(usingCheckDigit: bool) -> Self
pub fn with_use_check_digit(usingCheckDigit: bool) -> Self
Creates a reader that can be configured to check the last character as a check digit. It will not decoded “extended Code 39” sequences.
@param usingCheckDigit if true, treat the last data character as a check digit, not data, and verify that the checksum passes.
sourcepub fn with_all_config(usingCheckDigit: bool, extendedMode: bool) -> Self
pub fn with_all_config(usingCheckDigit: bool, extendedMode: bool) -> Self
Creates a reader that can be configured to check the last character as a check digit, or optionally attempt to decode “extended Code 39” sequences that are used to encode the full ASCII character set.
@param usingCheckDigit if true, treat the last data character as a check digit, not data, and verify that the checksum passes. @param extendedMode if true, will attempt to decode extended Code 39 sequences in the text.
Trait Implementations§
source§impl Default for Code39Reader
impl Default for Code39Reader
source§impl OneDReader for Code39Reader
impl OneDReader for Code39Reader
source§fn decode_row(
&mut self,
rowNumber: u32,
row: &BitArray,
_hints: &DecodingHintDictionary
) -> Result<RXingResult>
fn decode_row( &mut self, rowNumber: u32, row: &BitArray, _hints: &DecodingHintDictionary ) -> Result<RXingResult>
Attempts to decode a one-dimensional barcode format given a single row of
source§fn _do_decode<B: Binarizer>(
&mut self,
image: &mut BinaryBitmap<B>,
hints: &DecodingHintDictionary
) -> Result<RXingResult>
fn _do_decode<B: Binarizer>( &mut self, image: &mut BinaryBitmap<B>, hints: &DecodingHintDictionary ) -> Result<RXingResult>
source§impl Reader for Code39Reader
impl Reader for Code39Reader
source§fn decode<B: Binarizer>(
&mut self,
image: &mut BinaryBitmap<B>
) -> Result<RXingResult, Exceptions>
fn decode<B: Binarizer>( &mut self, image: &mut BinaryBitmap<B> ) -> Result<RXingResult, Exceptions>
source§fn decode_with_hints<B: Binarizer>(
&mut self,
image: &mut BinaryBitmap<B>,
hints: &DecodingHintDictionary
) -> Result<RXingResult, Exceptions>
fn decode_with_hints<B: Binarizer>( &mut self, image: &mut BinaryBitmap<B>, hints: &DecodingHintDictionary ) -> Result<RXingResult, Exceptions>
Auto Trait Implementations§
impl RefUnwindSafe for Code39Reader
impl Send for Code39Reader
impl Sync for Code39Reader
impl Unpin for Code39Reader
impl UnwindSafe for Code39Reader
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
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
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.