summaryrefslogtreecommitdiff
path: root/src/parameter.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-09 12:10:35 +0100
committertroido <troido@protonmail.com>2020-02-09 12:10:35 +0100
commitb1da31499de4145b1f77296cbea0c637e6f866bf (patch)
tree38756f28100add668d589f1ac25307c027ed2e28 /src/parameter.rs
parentf13c592c80f33b8ba5afeac2ede6594a65f26344 (diff)
componentwrapper parameters are now directly usable in creation macro expansion
Diffstat (limited to 'src/parameter.rs')
-rw-r--r--src/parameter.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/parameter.rs b/src/parameter.rs
index 41137bb..33eee25 100644
--- a/src/parameter.rs
+++ b/src/parameter.rs
@@ -46,41 +46,11 @@ impl Parameter {
};
Self::from_typed_json(typ, val)
}
-
- pub fn as_str(&self) -> Option<&str> {
- if let Self::String(str) = self {
- Some(str)
- } else {
- None
- }
- }
-
- pub fn as_string(&self) -> Option<String> {
- Some(self.as_str()?.to_string())
- }
-
- #[allow(dead_code)]
- pub fn as_i64(&self) -> Option<i64> {
- if let Self::Int(num) = self {
- Some(*num)
- } else {
- None
- }
- }
-
- pub fn as_f64(&self) -> Option<f64> {
- if let Self::Float(num) = self {
- Some(*num)
- } else {
- None
- }
- }
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ParameterType {
String,
-// Pos,
Int,
Float
}