#[repr(transparent)]
pub struct Multiboot2Header<'a> { /* private fields */ }
Expand description

Wrapper type around a pointer to the Multiboot2 header. The Multiboot2 header is the Multiboot2BasicHeader followed by all tags (see crate::tags::HeaderTagType). Use this if you get a pointer to the header and just want to parse it. If you want to construct the type by yourself, please look at crate::builder::Multiboot2HeaderBuilder.

Implementations

Public constructor for this type with various validations. It panics if the address is invalid. It panics rather than returning a result, because if this fails, it is a fatal, unrecoverable error anyways and a bug in your code.

Panics

Panics if one of the following conditions is true:

  • addr is a null-pointer
  • addr isn’t 8-byte aligned
  • the magic value of the header is not present
  • the checksum field is invalid
Safety

This function may produce undefined behaviour, if the provided addr is not a valid Multiboot2 header pointer.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.