Struct Builder

Source
pub struct Builder { /* private fields */ }
Expand description

Builder for a Multiboot2 header information.

Implementations§

Source§

impl Builder

Source

pub const fn new() -> Self

Creates a new builder.

Source

pub fn cmdline(self, cmdline: Box<CommandLineTag>) -> Self

Sets the CommandLineTag tag.

Source

pub fn bootloader(self, bootloader: Box<BootLoaderNameTag>) -> Self

Sets the BootLoaderNameTag tag.

Source

pub fn add_module(self, module: Box<ModuleTag>) -> Self

Adds a ModuleTag tag.

Source

pub const fn meminfo(self, meminfo: BasicMemoryInfoTag) -> Self

Sets the BasicMemoryInfoTag tag.

Source

pub const fn bootdev(self, bootdev: BootdevTag) -> Self

Sets the BootdevTag tag.

Source

pub fn mmap(self, mmap: Box<MemoryMapTag>) -> Self

Sets the MemoryMapTag tag.

Source

pub const fn vbe(self, vbe: VBEInfoTag) -> Self

Sets the VBEInfoTag tag.

Source

pub fn framebuffer(self, framebuffer: Box<FramebufferTag>) -> Self

Sets the FramebufferTag tag.

Source

pub fn elf_sections(self, elf_sections: Box<ElfSectionsTag>) -> Self

Sets the ElfSectionsTag tag.

Source

pub const fn apm(self, apm: ApmTag) -> Self

Sets the ApmTag tag.

Source

pub const fn efi32(self, efi32: EFISdt32Tag) -> Self

Sets the EFISdt32Tag tag.

Source

pub const fn efi64(self, efi64: EFISdt64Tag) -> Self

Sets the EFISdt64Tag tag.

Source

pub fn add_smbios(self, smbios: Box<SmbiosTag>) -> Self

Adds a SmbiosTag tag.

Source

pub const fn rsdpv1(self, rsdpv1: RsdpV1Tag) -> Self

Sets the RsdpV1Tag tag.

Source

pub const fn rsdpv2(self, rsdpv2: RsdpV2Tag) -> Self

Sets the RsdpV2Tag tag.

Source

pub fn efi_mmap(self, efi_mmap: Box<EFIMemoryMapTag>) -> Self

Sets the EFIMemoryMapTag tag.

Source

pub fn network(self, network: Box<NetworkTag>) -> Self

Sets the NetworkTag tag.

Source

pub const fn efi_bs(self, efi_bs: EFIBootServicesNotExitedTag) -> Self

Source

pub const fn efi32_ih(self, efi32_ih: EFIImageHandle32Tag) -> Self

Sets the EFIImageHandle32Tag tag.

Source

pub const fn efi64_ih(self, efi64_ih: EFIImageHandle64Tag) -> Self

Sets the EFIImageHandle64Tag tag.

Source

pub const fn image_load_addr( self, image_load_addr: ImageLoadPhysAddrTag, ) -> Self

Sets the ImageLoadPhysAddrTag tag.

Source

pub fn add_custom_tag( self, custom_tag: Box<DynSizedStructure<TagHeader>>, ) -> Self

Adds a custom tag.

Source

pub fn build(self) -> Box<DynSizedStructure<BootInformationHeader>>

Returns properly aligned bytes on the heap representing a valid Multiboot2 header structure.

Trait Implementations§

Source§

impl Debug for Builder

Source§

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

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

impl Default for Builder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Builder

§

impl RefUnwindSafe for Builder

§

impl Send for Builder

§

impl Sync for Builder

§

impl Unpin for Builder

§

impl UnwindSafe for Builder

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

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
§

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.