Impl Binary, LowerHex, Octal, and UpperHex for VirtAddr
@@ -206,6 +206,34 @@ impl fmt::Debug for VirtAddr {
}
}
+impl fmt::Binary for VirtAddr {
+ #[inline]
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ self.0.fmt(f)
+ }
+}
+
+impl fmt::LowerHex for VirtAddr {
+ #[inline]
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ self.0.fmt(f)
+ }
+}
+
+impl fmt::Octal for VirtAddr {
+ #[inline]
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ self.0.fmt(f)
+ }
+}
+
+impl fmt::UpperHex for VirtAddr {
+ #[inline]
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ self.0.fmt(f)
+ }
+}
+
impl Add<u64> for VirtAddr {
type Output = Self;
#[inline]
