pub struct InformationBuilder { /* private fields */ }
Expand description

Builder to construct a valid Multiboot2 information dynamically at runtime. The tags will appear in the order of their corresponding enumeration, except for the END tag.

Implementations§

source§

impl InformationBuilder

source

pub const fn new() -> Self

source

pub fn expected_len(&self) -> usize

Returns the expected length of the boot information, when the Self::build-method gets called.

source

pub fn build(self) -> BootInformationBytes

Constructs the bytes for a valid Multiboot2 information with the given properties.

source

pub fn basic_memory_info_tag( &mut self, basic_memory_info_tag: BasicMemoryInfoTag )

source

pub fn bootloader_name_tag( &mut self, boot_loader_name_tag: BoxedDst<BootLoaderNameTag> )

source

pub fn command_line_tag(&mut self, command_line_tag: BoxedDst<CommandLineTag>)

source

pub fn efisdt32_tag(&mut self, efisdt32: EFISdt32Tag)

source

pub fn efisdt64_tag(&mut self, efisdt64: EFISdt64Tag)

source

pub fn efi_boot_services_not_exited_tag(&mut self)

source

pub fn efi_image_handle32(&mut self, efi_image_handle32: EFIImageHandle32Tag)

source

pub fn efi_image_handle64(&mut self, efi_image_handle64: EFIImageHandle64Tag)

source

pub fn efi_memory_map_tag( &mut self, efi_memory_map_tag: BoxedDst<EFIMemoryMapTag> )

source

pub fn elf_sections_tag(&mut self, elf_sections_tag: BoxedDst<ElfSectionsTag>)

source

pub fn framebuffer_tag(&mut self, framebuffer_tag: BoxedDst<FramebufferTag>)

source

pub fn image_load_addr(&mut self, image_load_addr: ImageLoadPhysAddrTag)

source

pub fn memory_map_tag(&mut self, memory_map_tag: BoxedDst<MemoryMapTag>)

source

pub fn add_module_tag(&mut self, module_tag: BoxedDst<ModuleTag>)

source

pub fn rsdp_v1_tag(&mut self, rsdp_v1_tag: RsdpV1Tag)

source

pub fn rsdp_v2_tag(&mut self, rsdp_v2_tag: RsdpV2Tag)

source

pub fn add_smbios_tag(&mut self, smbios_tag: BoxedDst<SmbiosTag>)

Trait Implementations§

source§

impl Debug for InformationBuilder

source§

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

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

impl PartialEq for InformationBuilder

source§

fn eq(&self, other: &InformationBuilder) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for InformationBuilder

source§

impl StructuralEq for InformationBuilder

source§

impl StructuralPartialEq for InformationBuilder

Auto Trait Implementations§

§

impl RefUnwindSafe for InformationBuilder

§

impl !Send for InformationBuilder

§

impl !Sync for InformationBuilder

§

impl Unpin for InformationBuilder

§

impl UnwindSafe for InformationBuilder

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.

source§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> TagTrait for T
where T: Pointee<Metadata = ()>,

source§

fn dst_size(_: &Tag) -> <T as Pointee>::Metadata

Returns the amount of items in the dynamically sized portion of the DST. Note that this is not the amount of bytes. So if the dynamically sized portion is 16 bytes in size and each element is 4 bytes big, then this function must return 4.
source§

unsafe fn from_base_tag<'a>(tag: &Tag) -> &'a Self

Creates a reference to a (dynamically sized) tag type in a safe way. DST tags need to implement a proper Self::dst_size implementation. Read more
§

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.