Enum rxing::DecodeHintValue
source · pub enum DecodeHintValue {
Other(String),
PureBarcode(bool),
PossibleFormats(HashSet<BarcodeFormat>),
TryHarder(bool),
CharacterSet(String),
AllowedLengths(Vec<u32>),
AssumeCode39CheckDigit(bool),
AssumeGs1(bool),
ReturnCodabarStartEnd(bool),
NeedResultPointCallback(RXingResultPointCallback),
AllowedEanExtensions(Vec<u32>),
AlsoInverted(bool),
}Variants§
Other(String)
Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
PureBarcode(bool)
Image is a pure monochrome image of a barcode. Doesn’t matter what it maps to; use {@link Boolean#TRUE}.
PossibleFormats(HashSet<BarcodeFormat>)
Image is known to be of one of a few possible formats. Maps to a {@link List} of {@link BarcodeFormat}s.
TryHarder(bool)
Spend more time to try to find a barcode; optimize for accuracy, not speed. Doesn’t matter what it maps to; use {@link Boolean#TRUE}.
CharacterSet(String)
Specifies what character encoding to use when decoding, where applicable (type String)
AllowedLengths(Vec<u32>)
Allowed lengths of encoded data – reject anything else. Maps to an {@code int[]}.
AssumeCode39CheckDigit(bool)
Assume Code 39 codes employ a check digit. Doesn’t matter what it maps to; use {@link Boolean#TRUE}.
AssumeGs1(bool)
Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn’t matter what it maps to; use {@link Boolean#TRUE}.
ReturnCodabarStartEnd(bool)
If true, return the start and end digits in a Codabar barcode instead of stripping them. They are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them to not be. Doesn’t matter what it maps to; use {@link Boolean#TRUE}.
NeedResultPointCallback(RXingResultPointCallback)
The caller needs to be notified via callback when a possible {@link RXingResultPoint} is found. Maps to a {@link RXingResultPointCallback}.
AllowedEanExtensions(Vec<u32>)
Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5]. If it is optional to have an extension, do not set this hint. If this is set, and a UPC or EAN barcode is found but an extension is not, then no result will be returned at all.
AlsoInverted(bool)
If true, also tries to decode as inverted image. All configured decoders are simply called a second time with an inverted image. Doesn’t matter what it maps to; use {@link Boolean#TRUE}.
Trait Implementations§
source§impl Clone for DecodeHintValue
impl Clone for DecodeHintValue
source§fn clone(&self) -> DecodeHintValue
fn clone(&self) -> DecodeHintValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for DecodeHintValue
impl Send for DecodeHintValue
impl Sync for DecodeHintValue
impl Unpin for DecodeHintValue
impl UnwindSafe for DecodeHintValue
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>
§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, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
§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
§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.