Crates.io | dare |
lib.rs | dare |
version | 0.0.3 |
source | src |
created_at | 2024-09-16 10:18:54.022773 |
updated_at | 2024-09-29 01:13:47.407185 |
description | daring flexible data representation |
homepage | |
repository | |
max_upload_size | |
id | 1376202 |
size | 15,451 |
A flexible Value
enum implementation in Rust, supporting various data types and providing type-safe operations.
From
trait implementationsuse dare::Value;
let number = Value::from(42);
let string = Value::from("Hello");
let array = Value::from(vec![Value::from(1), Value::from(2)]);
assert!(number.is_number());
assert_eq!(string.as_string(), Some("Hello".to_string()));
println!("{}", array); // Outputs: [1, 2]