#[repr(C, align(8))]pub struct TagHeader {
pub typ: TagTypeId,
pub size: u32,
}
Expand description
The common header that all tags have in common. This type is ABI compatible.
Not to be confused with Multiboot header tags, which are something different.
It is the sized counterpart of GenericTag
, an internal type.
Fields§
§typ: TagTypeId
The ABI-compatible TagType
.
size: u32
The total size of the tag including the header.
Implementations§
Trait Implementations§
Source§impl Header for TagHeader
impl Header for TagHeader
Source§fn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Returns the length of the payload, i.e., the bytes that are additional
to the header. The value is measured in bytes.
Source§fn total_size(&self) -> usize
fn total_size(&self) -> usize
Returns the total size of the struct, thus the size of the header itself
plus
Header::payload_len
.Source§impl Ord for TagHeader
impl Ord for TagHeader
Source§impl PartialOrd for TagHeader
impl PartialOrd for TagHeader
impl Copy for TagHeader
impl Eq for TagHeader
impl StructuralPartialEq for TagHeader
Auto Trait Implementations§
impl Freeze for TagHeader
impl RefUnwindSafe for TagHeader
impl Send for TagHeader
impl Sync for TagHeader
impl Unpin for TagHeader
impl UnwindSafe for TagHeader
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)