Enum rxing::EncodeHintValue
source · pub enum EncodeHintValue {
Show 19 variants
ErrorCorrection(String),
CharacterSet(String),
DataMatrixShape(SymbolShapeHint),
DataMatrixCompact(bool),
MinSize(Dimension),
MaxSize(Dimension),
Margin(String),
Pdf417Compact(String),
Pdf417Compaction(String),
Pdf417Dimensions(Dimensions),
Pdf417AutoEci(String),
AztecLayers(i32),
QrVersion(String),
QrMaskPattern(String),
QrCompact(String),
Gs1Format(bool),
ForceCodeSet(String),
ForceC40(bool),
Code128Compact(bool),
}Variants§
ErrorCorrection(String)
Specifies what degree of error correction to use, for example in QR Codes. Type depends on the encoder. For example for QR codes it’s type {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}. For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words. For PDF417 it is of type {@link Integer}, valid values being 0 to 8. In all cases, it can also be a {@link String} representation of the desired value as well. Note: an Aztec symbol should have a minimum of 25% EC words.
CharacterSet(String)
Specifies what character encoding to use where applicable (type {@link String})
DataMatrixShape(SymbolShapeHint)
Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
DataMatrixCompact(bool)
Specifies whether to use compact mode for Data Matrix (type {@link Boolean}, or “true” or “false” {@link String } value). The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1 character set via ECIs. Please note that in that case, the most compact character encoding is chosen for characters in the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint. Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords for the purpose of delimiting AIs. This option and {@link #FORCE_C40} are mutually exclusive.
MinSize(Dimension)
Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
@deprecated use width/height params in {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
MaxSize(Dimension)
Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
@deprecated without replacement
Margin(String)
Specifies margin, in pixels, to use when generating the barcode. The meaning can vary by format; for example it controls margin before and after the barcode horizontally for most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
Pdf417Compact(String)
Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or “true” or “false” {@link String} value).
Pdf417Compaction(String)
Specifies what compaction mode to use for PDF417 (type {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its enum values).
Pdf417Dimensions(Dimensions)
Specifies the minimum and maximum number of rows and columns for PDF417 (type {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
Pdf417AutoEci(String)
Specifies whether to automatically insert ECIs when encoding PDF417 (type {@link Boolean}, or “true” or “false” {@link String} value). Please note that in that case, the most compact character encoding is chosen for characters in the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint.
AztecLayers(i32)
Specifies the required number of layers for an Aztec code. A negative number (-1, -2, -3, -4) specifies a compact Aztec code. 0 indicates to use the minimum number of layers (the default). A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code. (Type {@link Integer}, or {@link String} representation of the integer value).
QrVersion(String)
Specifies the exact version of QR code to be encoded. (Type {@link Integer}, or {@link String} representation of the integer value).
QrMaskPattern(String)
Specifies the QR code mask pattern to be used. Allowed values are 0..QRCode.NUM_MASK_PATTERNS-1. By default the code will automatically select the optimal mask pattern.
- (Type {@link Integer}, or {@link String} representation of the integer value).
QrCompact(String)
Specifies whether to use compact mode for QR code (type {@link Boolean}, or “true” or “false” {@link String } value). Please note that when compaction is performed, the most compact character encoding is chosen for characters in the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint.
Gs1Format(bool)
Specifies whether the data should be encoded to the GS1 standard (type {@link Boolean}, or “true” or “false” {@link String } value).
ForceCodeSet(String)
Forces which encoding will be used. Currently only used for Code-128 code sets (Type {@link String}). Valid values are “A”, “B”, “C”. This option and {@link #CODE128_COMPACT} are mutually exclusive.
ForceC40(bool)
Forces C40 encoding for data-matrix (type {@link Boolean}, or “true” or “false”) {@link String } value). This option and {@link #DATA_MATRIX_COMPACT} are mutually exclusive.
Code128Compact(bool)
Specifies whether to use compact mode for Code-128 code (type {@link Boolean}, or “true” or “false” {@link String } value). This can yield slightly smaller bar codes. This option and {@link #FORCE_CODE_SET} are mutually exclusive.
Auto Trait Implementations§
impl RefUnwindSafe for EncodeHintValue
impl Send for EncodeHintValue
impl Sync for EncodeHintValue
impl Unpin for EncodeHintValue
impl UnwindSafe for EncodeHintValue
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.