hermit::arch

Trait PageSize

Source
pub trait PageSize:
    Copy
    + Eq
    + PartialOrd
    + Ord
    + Sealed {
    const SIZE: u64;
    const DEBUG_STR: &'static str;
}
Expand description

Trait for abstracting over the three possible page sizes on x86_64, 4KiB, 2MiB, 1GiB.

Required Associated Constants§

Source

const SIZE: u64

The page size in bytes.

Source

const DEBUG_STR: &'static str

A string representation of the page size for debug output.

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§

Source§

impl PageSize for Size1GiB

Source§

const SIZE: u64 = 1_073_741_824u64

Source§

const DEBUG_STR: &'static str = "1GiB"

Source§

impl PageSize for Size2MiB

Source§

const SIZE: u64 = 2_097_152u64

Source§

const DEBUG_STR: &'static str = "2MiB"

Source§

impl PageSize for Size4KiB

Source§

const SIZE: u64 = 4_096u64

Source§

const DEBUG_STR: &'static str = "4KiB"