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.

Object Safety§

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"