New parameter module

This commit is contained in:
David Peter authored and David Peter committed 2022-02-06 20:19:50 +01:00
1 parent 865290a144
commit 47091a5740
7 files changed
+43 -40

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
use crate::numeric::NumericType;
pub mod range;
pub mod tokenize;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ParameterValue {
Text(String),
Numeric(NumericType),
}
impl<'a> ToString for ParameterValue {
fn to_string(&self) -> String {
match self {
ParameterValue::Text(ref value) => value.clone(),
ParameterValue::Numeric(value) => value.to_string(),
}
}
}