forked from rxing-core/rxing
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,9 @@ use std::collections::HashSet; | |
|
||
use crate::{BarcodeFormat, RXingResultPointCallback}; | ||
|
||
#[cfg(feature = "serde")] | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/** | ||
* Encapsulates a type of hint that a caller may pass to a barcode reader to help it | ||
* more quickly or accurately decode it. It is up to implementations to decide what, | ||
|
@@ -29,6 +32,7 @@ use crate::{BarcodeFormat, RXingResultPointCallback}; | |
* @author [email protected] (Daniel Switkin) | ||
* @see Reader#decode(BinaryBitmap,java.util.Map) | ||
*/ | ||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
#[derive(Eq, PartialEq, Hash, Debug, Clone, Copy)] | ||
pub enum DecodeHintType { | ||
/** | ||
|
@@ -137,6 +141,7 @@ pub enum DecodeHintType { | |
}*/ | ||
} | ||
|
||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
#[derive(Clone)] | ||
pub enum DecodeHintValue { | ||
/** | ||
|
@@ -196,6 +201,7 @@ pub enum DecodeHintValue { | |
* The caller needs to be notified via callback when a possible {@link RXingResultPoint} | ||
* is found. Maps to a {@link RXingResultPointCallback}. | ||
*/ | ||
#[cfg_attr(feature = "serde", serde(skip_serializing, skip_deserializing))] | ||
NeedResultPointCallback(RXingResultPointCallback), | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,19 @@ | |
|
||
//package com.google.zxing; | ||
|
||
#![allow(deprecated)] | ||
|
||
use crate::{pdf417::encoder::Dimensions, Dimension}; | ||
|
||
#[cfg(feature = "serde")] | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/** | ||
* These are a set of hints that you may pass to Writers to specify their behavior. | ||
* | ||
* @author [email protected] (Daniel Switkin) | ||
*/ | ||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] | ||
pub enum EncodeHintType { | ||
/** | ||
|
@@ -176,6 +182,7 @@ pub enum EncodeHintType { | |
CODE128_COMPACT, | ||
} | ||
|
||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
pub enum EncodeHintValue { | ||
/** | ||
* Specifies what degree of error correction to use, for example in QR Codes. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,15 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
#[cfg(feature = "serde")] | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/** | ||
* Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. | ||
* | ||
* @author [email protected] (Andrew Walbran) | ||
*/ | ||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
#[derive(Copy, Clone, Eq, PartialEq)] | ||
pub struct Dimensions { | ||
minCols: usize, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters