Struct multiboot2_header::builder::Multiboot2HeaderBuilder
source · [−]pub struct Multiboot2HeaderBuilder { /* private fields */ }Expand description
Builder to construct a valid Multiboot2 header dynamically at runtime. The tags will appear in the order of their corresponding enumeration, except for the END tag.
Implementations
sourceimpl Multiboot2HeaderBuilder
impl Multiboot2HeaderBuilder
pub const fn new(arch: HeaderTagISA) -> Self
sourcepub fn expected_len(&self) -> usize
pub fn expected_len(&self) -> usize
Returns the expected length of the Multiboot2 header,
when the build()-method gets called.
sourcepub fn build(self) -> Vec<u8>
pub fn build(self) -> Vec<u8>
Constructs the bytes for a valid Multiboot2 header with the given properties. The bytes can be casted to a Multiboot2 structure.
pub fn information_request_tag(
self,
information_request_tag: InformationRequestHeaderTagBuilder
) -> Self
pub const fn address_tag(self, address_tag: AddressHeaderTag) -> Self
pub const fn entry_tag(self, entry_tag: EntryAddressHeaderTag) -> Self
pub const fn console_tag(self, console_tag: ConsoleHeaderTag) -> Self
pub const fn framebuffer_tag(
self,
framebuffer_tag: FramebufferHeaderTag
) -> Self
pub const fn module_align_tag(
self,
module_align_tag: ModuleAlignHeaderTag
) -> Self
pub const fn efi_bs_tag(self, efi_bs_tag: EfiBootServiceHeaderTag) -> Self
pub const fn efi_32_tag(self, efi_32_tag: EntryEfi32HeaderTag) -> Self
pub const fn efi_64_tag(self, efi_64_tag: EntryEfi64HeaderTag) -> Self
pub const fn relocatable_tag(
self,
relocatable_tag: RelocatableHeaderTag
) -> Self
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Multiboot2HeaderBuilder
impl Send for Multiboot2HeaderBuilder
impl Sync for Multiboot2HeaderBuilder
impl Unpin for Multiboot2HeaderBuilder
impl UnwindSafe for Multiboot2HeaderBuilder
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