#![no_std]
#[macro_export]
macro_rules! define_newtype {
($(#[$meta:meta])* $vis:vis struct $name:ident($inner:ty);) => {
$(#[$meta])*
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
$vis struct $name($inner);
impl $name {
$vis const fn from_raw(val: $inner) -> Self {
Self(val)
}
$vis const fn raw(self) -> $inner {
self.0
}
}
};
}