summaryrefslogtreecommitdiffstats
path: root/librepology/src/v1/types/name.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2019-04-23 16:49:30 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2019-04-24 08:14:42 +0200
commit35e92e4055b8a6c6294602627896cc22d234c0bd (patch)
treeeab80d9db64cc63137d49198cabb33399cf98520 /librepology/src/v1/types/name.rs
parentcf4edeadab3f54b328cbdd17e6d2ca8ac92e4a85 (diff)
Split types into module and submodules
Without breaking the build because we reexport the private submodule types in the crate::v1::types module.
Diffstat (limited to 'librepology/src/v1/types/name.rs')
-rw-r--r--librepology/src/v1/types/name.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/librepology/src/v1/types/name.rs b/librepology/src/v1/types/name.rs
new file mode 100644
index 0000000..649e70d
--- /dev/null
+++ b/librepology/src/v1/types/name.rs
@@ -0,0 +1,14 @@
+use std::ops::Deref;
+
+// package name as in repository (if different from version)
+#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)]
+pub struct Name(String);
+
+impl Deref for Name {
+ type Target = String;
+
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+