summaryrefslogtreecommitdiffstats
path: root/librepology/src/v1/types/name.rs
diff options
context:
space:
mode:
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
+ }
+}
+