pub trait SizeConstants {
Show 22 associated constants and 0 method
const SZ_1K: Self;
const SZ_2K: Self;
const SZ_4K: Self;
const SZ_8K: Self;
const SZ_16K: Self;
const SZ_32K: Self;
const SZ_64K: Self;
const SZ_128K: Self;
const SZ_256K: Self;
const SZ_512K: Self;
const SZ_1M: Self;
const SZ_2M: Self;
const SZ_4M: Self;
const SZ_8M: Self;
const SZ_16M: Self;
const SZ_32M: Self;
const SZ_64M: Self;
const SZ_128M: Self;
const SZ_256M: Self;
const SZ_512M: Self;
const SZ_1G: Self;
const SZ_2G: Self;
}Expand description
Size constants for device address spaces.
Implemented for u32, u64, and usize so drivers can
choose the width that matches their hardware. All SZ_* values fit
in a u32, so all implementations are lossless.
§Examples
use kernel::sizes::SizeConstants;
let gpu_heap = 14 * u64::SZ_1M;
let mmio_window = u32::SZ_16M;Required Associated Constants§
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.