dungeon_cell/layout/alignment.rs
1/// Alignment in bytes.
2///
3/// This is the type to use where a [`IsAlignment`][crate::marker_traits::IsAlignment] generic is required.
4/// This type acts as a wrapper for a `usize` const generic value to improve the readability of the
5/// API.
6///
7/// Alignment values with a power of two from 1 up to 2²⁹ are allowed as
8/// given by the [rust reference](https://doc.rust-lang.org/reference/type-layout.html#the-alignment-modifiers).
9///
10/// # Examples
11/// ```
12/// use dungeon_cell::layout::Alignment;
13/// use dungeon_cell::marker_traits::IsAlignment;
14///
15/// assert_eq!(Alignment::<8>::VALUE, 8);
16/// ```
17#[derive(Copy, Clone)]
18pub struct Alignment<const N: usize> {
19 _private: (),
20}