bootloader_x86_64_common::legacy_memory_region

Trait LegacyMemoryRegion

Source
pub trait LegacyMemoryRegion: Copy + Debug {
    // Required methods
    fn start(&self) -> PhysAddr;
    fn len(&self) -> u64;
    fn kind(&self) -> MemoryRegionKind;
    fn usable_after_bootloader_exit(&self) -> bool;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Abstraction trait for a memory region returned by the UEFI or BIOS firmware.

Required Methods§

Source

fn start(&self) -> PhysAddr

Returns the physical start address of the region.

Source

fn len(&self) -> u64

Returns the size of the region in bytes.

Source

fn kind(&self) -> MemoryRegionKind

Returns the type of the region, e.g. whether it is usable or reserved.

Source

fn usable_after_bootloader_exit(&self) -> bool

Some regions become usable when the bootloader jumps to the kernel.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns whether this region is empty.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§