mycelium_kernel::arch::mm::page

Trait StaticSize

Source
pub trait StaticSize:
    Copy
    + Eq
    + PartialEq
    + Display {
    const SIZE: usize;
    const PRETTY_NAME: &'static str;
    const INSTANCE: Self;
}
Expand description

A statically known page size.

Required Associated Constants§

Source

const SIZE: usize

The size (in bytes) of this page.

Source

const PRETTY_NAME: &'static str

Source

const INSTANCE: Self

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 StaticSize for Size1Gb

Source§

const SIZE: usize = 1_073_741_824usize

Source§

const PRETTY_NAME: &'static str = "1GB"

Source§

const INSTANCE: Size1Gb = Size1Gb

Source§

impl StaticSize for Size2Mb

Source§

const SIZE: usize = 2_097_152usize

Source§

const PRETTY_NAME: &'static str = "2MB"

Source§

const INSTANCE: Size2Mb = Size2Mb

Source§

impl StaticSize for Size4Kb

Source§

const SIZE: usize = 4_096usize

Source§

const PRETTY_NAME: &'static str = "4KB"

Source§

const INSTANCE: Size4Kb = Size4Kb