Skip to main content

PageSize

Trait PageSize 

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§

const SIZE: u64

The page size in bytes.

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".

Implementors§

§

impl PageSize for Size1GiB

§

const SIZE: u64

§

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

§

impl PageSize for Size2MiB

§

const SIZE: u64

§

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

§

impl PageSize for Size4KiB

§

const SIZE: u64 = 4096

§

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