iowo/crates/prowocessing/src/experimental/trait_based/data/raw.rs

21 lines
357 B
Rust
Raw Normal View History

2024-07-08 20:48:56 +02:00
//! Dynamic data storage and transfer types for use in [`io`]
// Dynamic data type
#[derive(Clone, Debug)]
2024-07-08 20:48:56 +02:00
pub enum Data {
String(String),
Int(i32),
}
2024-07-08 20:48:56 +02:00
impl From<String> for Data {
fn from(value: String) -> Self {
Self::String(value)
}
}
2024-07-08 20:48:56 +02:00
impl From<i32> for Data {
fn from(value: i32) -> Self {
Self::Int(value)
}
}