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
sourceimpl Header
impl Header
sourcepub fn from_slice(buffer: &[u8]) -> Option<Self>
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.
sourcepub fn wants_modules_page_aligned(&self) -> bool
pub fn wants_modules_page_aligned(&self) -> bool
If true, then the modules have to be page aligned.
sourcepub fn set_wants_modules_page_aligned(&mut self, flag: bool)
pub fn set_wants_modules_page_aligned(&mut self, flag: bool)
If true, then the modules have to be page aligned.
sourcepub fn wants_memory_information(&self) -> bool
pub fn wants_memory_information(&self) -> bool
If true, memory information must be passed.
sourcepub fn set_wants_memory_information(&mut self, flag: bool)
pub fn set_wants_memory_information(&mut self, flag: bool)
If true, memory information must be passed.
sourcepub fn has_video_mode(&self) -> bool
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.
sourcepub fn set_has_video_mode(&mut self, flag: bool)
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.
sourcepub fn has_multiboot_addresses(&self) -> bool
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.
sourcepub fn set_has_multiboot_addresses(&mut self, flag: bool)
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.
sourcepub fn get_addresses(&self) -> Option<MultibootAddresses>
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.
sourcepub fn get_preferred_video_mode(&self) -> Option<MultibootVideoMode>
pub fn get_preferred_video_mode(&self) -> Option<MultibootVideoMode>
Get the preferred video mode specified in the Multiboot header.
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more