From baccac6af37ec3626ea31be4bb07461af3f733e9 Mon Sep 17 00:00:00 2001 From: Enola Knezevic Date: Mon, 8 Jul 2024 13:00:53 +0200 Subject: [PATCH] added another type of extension to mr struct --- Cargo.toml | 2 +- src/mr.rs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 62431ff..116bf5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prism" -version = "0.1.0" +version = "0.1.1" edition = "2021" license = "Apache-2.0" diff --git a/src/mr.rs b/src/mr.rs index ca74ef5..5a11dc0 100644 --- a/src/mr.rs +++ b/src/mr.rs @@ -59,11 +59,18 @@ struct ValueQuantity { value: f64, } +#[derive(Debug, Deserialize, Serialize)] +struct ValueRatio { + denominator: Value, + numerator: Value, +} + #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] struct Extension { url: String, - value_quantity: ValueQuantity, + value_quantity: Option, + value_ratio: Option, } #[derive(Debug, Deserialize, Serialize)]