summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-04-27 16:32:52 +0200
committerMarkus Unterwaditzer <markus@unterwaditzer.net>2018-04-27 16:32:52 +0200
commita53a0deecda26291405ea9fed7f47e64cf6b91ec (patch)
treec5e622505f5c9a72b082dcad5c9d48c388447498
parentb0437cf635d57c0467b0da775a8594af8d2d7a46 (diff)
Add params getter for helper datatype generator (#24)
With this helper function, one can get the parameters from a helper data type. For example the email data parameters "HOME", "WORK".
-rw-r--r--src/util.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs
index 9f428c9..44191e8 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -43,6 +43,10 @@ macro_rules! create_data_type {
pub fn into_raw(self) -> String {
self.0
}
+
+ pub fn params(&self) -> &$crate::param::Parameters {
+ &self.1
+ }
}
impl From<Property> for $name {