commit 954e7a20b3fbe2bc613d1ec072aa8e4704f2c691 Author: Tait Hoyem Date: Tue Dec 7 19:22:10 2021 -0700 inital commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96ef6c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..800c8a7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "ocr-json-common" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +serde = { version = "1.0", features = ["derive"] } diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..c1d5452 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,22 @@ +use serde::{Serialize, Deserialize}; + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct TextBox { + pub id: u32, + pub hint: String, + pub confidence: u32, + pub width: u32, + pub height: u32, + pub x: i32, + pub y: i32, +} + + +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + let result = 2 + 2; + assert_eq!(result, 4); + } +}