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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
The error type produced by a failed conversion.
Convert the given value into an approximately equivalent representation.
The error type produced by a failed conversion.
Convert the subject into an approximately equivalent representation.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Approximate the subject with the default scheme.
Approximate the subject with a specific scheme.
Approximate the subject to a given type with the default scheme.
Approximate the subject to a given type with a specific scheme.
Convert the subject to a given type.
Attempt to convert the subject to a given type.
Attempt a value conversion of the subject to a given type.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The error type produced by a failed conversion.
Convert the given value into the subject type.
The type returned in the event of a conversion error.
Performs the conversion.
The error type produced by a failed conversion.
Convert the subject into the destination type.
The type returned in the event of a conversion error.
Performs the conversion.
The error type produced by a failed conversion.
Convert the given value into an exactly equivalent representation.
The error type produced by a failed conversion.
Convert the subject into an exactly equivalent representation.