Trait hal::memory::FrameSize

source ·
pub trait FrameSize: Clone + Copy + PartialEq + Eq + PartialOrd + Ord + Debug {
    const SIZE: Bytes;

    // Provided method
    fn frames_needed(bytes: Bytes) -> Bytes { ... }
}
Expand description

This trait is implemented by a number of marker types, one for each size of frame and page. Different size types are defined depending on the target architecture.

Required Associated Constants§

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§

source§

impl FrameSize for Size1GiB

source§

const SIZE: Bytes = 1_073_741_824usize

source§

impl FrameSize for Size2MiB

source§

const SIZE: Bytes = 2_097_152usize

source§

impl FrameSize for Size4KiB

source§

const SIZE: Bytes = 4_096usize