Struct rstubs::multiboot::Info

source ·
#[repr(C)]
pub struct Info {
Show 16 fields pub flags: Flags, mem: Memory, boot_device: BootDevice, cmdline: RefStr, mods_count: u32, mods_addr: *const Module, symbols: SymbolsUnion, mmap_length: u32, mmap_addr: *const MemoryEntry, drives_length: u32, drives_addr: u32, _config_table: u32, boot_loader_name: RefStr, _apm_table: u32, vbe: VBETable, framebuffer: FramebufferTable,
}
Expand description

Representation of Multiboot Information according to specification.

Fields§

§flags: Flags§mem: Memory§boot_device: BootDevice§cmdline: RefStr§mods_count: u32§mods_addr: *const Module§symbols: SymbolsUnion§mmap_length: u32§mmap_addr: *const MemoryEntry§drives_length: u32§drives_addr: u32§_config_table: u32§boot_loader_name: RefStr§_apm_table: u32§vbe: VBETable§framebuffer: FramebufferTable

Implementations§

source§

impl Info

source

pub unsafe fn from_ptr(ptr: *const u8) -> &'static Self

Parses the Multiboot information structures

source

pub fn memory(&self) -> Option<&Memory>

Returns the memory sizes

source

pub fn boot_device(&self) -> Option<&BootDevice>

Indicates which bios disk device the boot loader loaded the OS image from.

source

pub fn cmdline(&self) -> Option<&str>

Command line to be passed to the kernel.

source

pub fn boot_loader_name(&self) -> Option<&str>

Get the name of the bootloader.

source

pub fn modules(&self) -> Option<&[Module]>

Discover all additional modules in multiboot.

source

pub fn symbols(&self) -> Option<Symbols>

Get the symbols.

source

pub fn memory_map(&self) -> Option<MemoryMapIter<'_>>

Discover all memory regions in the multiboot memory map.

source

pub fn find_highest_address(&self) -> u32

Return end address of multiboot image.

This function can be used to figure out a (hopefully) safe offset in the first region of memory to start using as free memory.

source

pub fn vbe(&self) -> Option<&VBETable>

Contains the VESA BIOS extensions

source

pub fn framebuffer(&self) -> Option<&FramebufferTable>

Contains the information about the framebuffer

Trait Implementations§

source§

impl Debug for Info

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Info

§

impl RefUnwindSafe for Info

§

impl !Send for Info

§

impl !Sync for Info

§

impl Unpin for Info

§

impl UnwindSafe for Info

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
§

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
source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
§

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.

source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

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.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.