summaryrefslogtreecommitdiff
path: root/src/sys/socket/addr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/socket/addr.rs')
-rw-r--r--src/sys/socket/addr.rs42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs
index dd2ae17d..445fb9ef 100644
--- a/src/sys/socket/addr.rs
+++ b/src/sys/socket/addr.rs
@@ -357,6 +357,12 @@ impl fmt::Display for InetAddr {
}
}
+impl fmt::Debug for InetAddr {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Display::fmt(self, f)
+ }
+}
+
/*
*
* ===== IpAddr =====
@@ -409,6 +415,12 @@ impl fmt::Display for IpAddr {
}
}
+impl fmt::Debug for IpAddr {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Display::fmt(self, f)
+ }
+}
+
/*
*
* ===== Ipv4Addr =====
@@ -470,6 +482,12 @@ impl fmt::Display for Ipv4Addr {
}
}
+impl fmt::Debug for Ipv4Addr {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Display::fmt(self, f)
+ }
+}
+
/*
*
* ===== Ipv6Addr =====
@@ -524,6 +542,12 @@ impl fmt::Display for Ipv6Addr {
}
}
+impl fmt::Debug for Ipv6Addr {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Display::fmt(self, f)
+ }
+}
+
/*
*
* ===== UnixAddr =====
@@ -658,6 +682,12 @@ impl fmt::Display for UnixAddr {
}
}
+impl fmt::Debug for UnixAddr {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Display::fmt(self, f)
+ }
+}
+
/*
*
* ===== Sock addr =====
@@ -850,6 +880,12 @@ pub mod netlink {
write!(f, "pid: {} groups: {}", self.pid(), self.groups())
}
}
+
+ impl fmt::Debug for NetlinkAddr {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Display::fmt(self, f)
+ }
+ }
}
#[cfg(any(target_os = "ios", target_os = "macos"))]
@@ -948,4 +984,10 @@ pub mod sys_control {
write!(f, "id: {} unit: {}", self.id(), self.unit())
}
}
+
+ impl fmt::Debug for SysControlAddr {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Display::fmt(self, f)
+ }
+ }
}