hal::memory

Trait 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§

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