#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Alignment(usize);
impl Alignment {
pub const ALIGN_1: Alignment = Alignment(1);
pub const ALIGN_2: Alignment = Alignment(2);
pub const ALIGN_4: Alignment = Alignment(4);
pub const ALIGN_8: Alignment = Alignment(8);
pub const ALIGN_16: Alignment = Alignment(16);
pub const ALIGN_32: Alignment = Alignment(32);
pub const ALIGN_64: Alignment = Alignment(64);
pub const ALIGN_128: Alignment = Alignment(128);
pub const ALIGN_256: Alignment = Alignment(256);
pub const ALIGN_512: Alignment = Alignment(512);
pub const ALIGN_1024: Alignment = Alignment(1024);
pub const ALIGN_2048: Alignment = Alignment(2048);
pub const ALIGN_4096: Alignment = Alignment(4096);
pub fn new(value: usize) -> Option<Self> {
(value.is_power_of_two()).then(|| unsafe { Self::new_unchecked(value) })
}
pub const unsafe fn new_unchecked(value: usize) -> Self {
Self(value)
}
pub const fn value(&self) -> usize {
self.0
}
}