Struct multiboot::header::Header

source ·
pub struct Header {
    pub header_start: u32,
    /* private fields */
}
Expand description

Multiboot struct bootloaders mainly interact with

Fields§

§header_start: u32

the index at which the header starts

Implementations§

source§

impl Header

source

pub fn from_slice(buffer: &[u8]) -> Option<Self>

Get the header by parsing it from a slice.

The needed portion of the slice is copied.

source

pub fn wants_modules_page_aligned(&self) -> bool

If true, then the modules have to be page aligned.

source

pub fn set_wants_modules_page_aligned(&mut self, flag: bool)

If true, then the modules have to be page aligned.

source

pub fn wants_memory_information(&self) -> bool

If true, memory information must be passed.

source

pub fn set_wants_memory_information(&mut self, flag: bool)

If true, memory information must be passed.

source

pub fn has_video_mode(&self) -> bool

If true, then the mode_type, width, height and depth fields are valid and video information has to be passed.

source

pub fn set_has_video_mode(&mut self, flag: bool)

If true, then the mode_type, width, height and depth fields are valid and video information has to be passed.

source

pub fn has_multiboot_addresses(&self) -> bool

If true, then the header_addr, load_addr, load_end_addr, bss_end_addr and entry_addr fields are valid and must be used to load the kernel.

source

pub fn set_has_multiboot_addresses(&mut self, flag: bool)

If true, then the header_addr, load_addr, load_end_addr, bss_end_addr and entry_addr fields are valid and must be used to load the kernel.

source

pub fn get_addresses(&self) -> Option<MultibootAddresses>

Get the load addresses specified in the Multiboot header.

If this function returns None the binary has to be loaded as an ELF instead.

source

pub fn get_preferred_video_mode(&self) -> Option<MultibootVideoMode>

Get the preferred video mode specified in the Multiboot header.

Trait Implementations§

source§

impl Clone for Header

source§

fn clone(&self) -> Header

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Header

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for Header

Auto Trait Implementations§

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.