Struct multiboot2::Tag
source · #[repr(C)]pub struct Tag {
pub typ: TagTypeId,
pub size: u32,
}
Expand description
Common base structure for all tags that can be passed via the Multiboot2 Information Structure (MBI) to a Multiboot2 payload/program/kernel.
Can be transformed to any other tag (sized or unsized/DST) via
Tag::cast_tag
.
Do not confuse them with the Multiboot2 header tags. They are something different.
Fields§
§typ: TagTypeId
§size: u32
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> TagTrait for Twhere
T: Pointee<Metadata = ()>,
impl<T> TagTrait for Twhere T: Pointee<Metadata = ()>,
source§fn dst_size(_: &Tag) -> <T as Pointee>::Metadata
fn dst_size(_: &Tag) -> <T as Pointee>::Metadata
Returns the amount of items in the dynamically sized portion of the
DST. Note that this is not the amount of bytes. So if the dynamically
sized portion is 16 bytes in size and each element is 4 bytes big, then
this function must return 4.
source§unsafe fn from_base_tag<'a>(tag: &Tag) -> &'a Self
unsafe fn from_base_tag<'a>(tag: &Tag) -> &'a Self
Creates a reference to a (dynamically sized) tag type in a safe way.
DST tags need to implement a proper
Self::dst_size
implementation. Read more