#[repr(C, align(8))]pub struct Multiboot2BasicHeader { /* private fields */ }
Expand description
The “basic” Multiboot2 header. This means only the properties, that are known during compile time. All other information are derived during runtime from the size property.
Implementations§
Source§impl Multiboot2BasicHeader
impl Multiboot2BasicHeader
Sourcepub const fn verify_checksum(&self) -> bool
pub const fn verify_checksum(&self) -> bool
Verifies that a Multiboot2 header is valid.
Sourcepub const fn calc_checksum(magic: u32, arch: HeaderTagISA, length: u32) -> u32
pub const fn calc_checksum(magic: u32, arch: HeaderTagISA, length: u32) -> u32
Calculates the checksum as described in the spec.
Sourcepub const fn header_magic(&self) -> u32
pub const fn header_magic(&self) -> u32
Returns the header magic.
Sourcepub const fn arch(&self) -> HeaderTagISA
pub const fn arch(&self) -> HeaderTagISA
Returns the HeaderTagISA
.
Trait Implementations§
Source§impl Clone for Multiboot2BasicHeader
impl Clone for Multiboot2BasicHeader
Source§fn clone(&self) -> Multiboot2BasicHeader
fn clone(&self) -> Multiboot2BasicHeader
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Multiboot2BasicHeader
impl Debug for Multiboot2BasicHeader
Source§impl Hash for Multiboot2BasicHeader
impl Hash for Multiboot2BasicHeader
Source§impl Header for Multiboot2BasicHeader
impl Header for Multiboot2BasicHeader
Source§fn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Returns the length of the payload, i.e., the bytes that are additional
to the header. The value is measured in bytes.
Source§fn total_size(&self) -> usize
fn total_size(&self) -> usize
Returns the total size of the struct, thus the size of the header itself
plus
Header::payload_len
.Source§impl Ord for Multiboot2BasicHeader
impl Ord for Multiboot2BasicHeader
Source§fn cmp(&self, other: &Multiboot2BasicHeader) -> Ordering
fn cmp(&self, other: &Multiboot2BasicHeader) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Multiboot2BasicHeader
impl PartialEq for Multiboot2BasicHeader
Source§impl PartialOrd for Multiboot2BasicHeader
impl PartialOrd for Multiboot2BasicHeader
impl Copy for Multiboot2BasicHeader
impl Eq for Multiboot2BasicHeader
impl StructuralPartialEq for Multiboot2BasicHeader
Auto Trait Implementations§
impl Freeze for Multiboot2BasicHeader
impl RefUnwindSafe for Multiboot2BasicHeader
impl Send for Multiboot2BasicHeader
impl Sync for Multiboot2BasicHeader
impl Unpin for Multiboot2BasicHeader
impl UnwindSafe for Multiboot2BasicHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more