|
@@ -19,7 +19,7 @@ use core::str::Utf8Error;
|
|
|
/// Multiboot2 [`Tag`]. This type can easily be created from or converted to
|
|
|
/// [`TagType`].
|
|
|
#[repr(transparent)]
|
|
|
-#[derive(Copy, Clone, Debug, PartialOrd, PartialEq, Eq, Ord, Hash)]
|
|
|
+#[derive(Copy, Clone, PartialOrd, PartialEq, Eq, Ord, Hash)]
|
|
|
pub struct TagTypeId(u32);
|
|
|
|
|
|
impl TagTypeId {
|
|
@@ -29,6 +29,13 @@ impl TagTypeId {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+impl Debug for TagTypeId {
|
|
|
+ fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
|
|
|
+ let tag_type = TagType::from(*self);
|
|
|
+ Debug::fmt(&tag_type, f)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/// Higher level abstraction for [`TagTypeId`] that assigns each possible value
|
|
|
/// to a specific semantic according to the specification. Additionally, it
|
|
|
/// allows to use the [`TagType::Custom`] variant. It is **not binary compatible**
|