Crates.io | trs-data-value |
lib.rs | trs-data-value |
version | 0.1.2 |
source | src |
created_at | 2024-12-05 20:23:55.692529 |
updated_at | 2024-12-10 18:46:37.121877 |
description | Data Value for common data types |
homepage | |
repository | |
max_upload_size | |
id | 1473585 |
size | 290,576 |
This is just simple wrapper for different data types. It's building block for dataframe and other parts of eco-system.
use data_value::{stdhashmap, DataValue, datavalue};
let dataset = datavalue!(
"name" => "test",
"age"=> 42i64,
"address"=> datavalue!{
"city" => "test",
"street"=> "test"
},
"list"=> datavalue!([1i64, 2i64, 3i64])
);
let json_dataset = serde_json::json!({
"name": "test",
"age": 42,
"address": {
"city": "test",
"street": "test"
},
"list": [1, 2, 3]
});
let json_dv = DataValue::from(json_dataset);
assert_eq!(dataset, json_dv);
cargo llvm-cov --lcov --output-path lcov.info