add basic serde support

This commit is contained in:
Henry Schimke
2023-01-26 14:01:29 -06:00
parent 081577591f
commit 6355dc1bfd
11 changed files with 49 additions and 6 deletions

View File

@@ -14,20 +14,19 @@
* limitations under the License.
*/
//package com.google.zxing;
//import java.util.EnumMap;
//import java.util.Map;
use std::{collections::HashMap, fmt};
use crate::{BarcodeFormat, RXingResultMetadataType, RXingResultMetadataValue, RXingResultPoint};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
/**
* <p>Encapsulates the result of decoding a barcode within an image.</p>
*
* @author Sean Owen
*/
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Clone)]
pub struct RXingResult {
text: String,