about summary refs log tree commit diff stats
path: root/crates/rocie-client/src/implies.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rocie-client/src/implies.rs')
-rw-r--r--crates/rocie-client/src/implies.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/rocie-client/src/implies.rs b/crates/rocie-client/src/implies.rs
new file mode 100644
index 0000000..147588a
--- /dev/null
+++ b/crates/rocie-client/src/implies.rs
@@ -0,0 +1,26 @@
+use std::fmt::Display;
+
+use crate::models::{BarcodeId, ProductId, UnitId};
+
+// TODO(@bpeetz): The client generator should just do this. <2025-09-23>
+
+impl Display for BarcodeId {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        self.value.fmt(f)
+    }
+}
+impl Copy for BarcodeId {}
+
+impl Display for ProductId {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        self.value.fmt(f)
+    }
+}
+impl Copy for ProductId {}
+
+impl Display for UnitId {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        self.value.fmt(f)
+    }
+}
+impl Copy for UnitId {}