]> git.proxmox.com Git - proxmox.git/commitdiff
auth-api: implement `Display` for `Realm{, Ref}`
authorChristoph Heiss <c.heiss@proxmox.com>
Fri, 12 Jan 2024 16:15:58 +0000 (17:15 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 25 Mar 2024 16:03:27 +0000 (17:03 +0100)
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
proxmox-auth-api/src/types.rs

index e11d0b1af580d75f0e4ab9143d125b0fb32379f8..c014a720d67110fe4705525160bf331af6075aeb 100644 (file)
@@ -301,6 +301,18 @@ impl PartialEq<Realm> for &RealmRef {
     }
 }
 
+impl fmt::Display for Realm {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fmt::Display::fmt(&self.0, f)
+    }
+}
+
+impl fmt::Display for RealmRef {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fmt::Display::fmt(&self.0, f)
+    }
+}
+
 #[api(
     type: String,
     format: &PROXMOX_TOKEN_NAME_FORMAT,