#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub struct Layer(u16);
impl Layer {
pub const fn new(value: u16) -> Self {
Self(value)
}
pub const fn value(self) -> u16 {
self.0
}
}
impl std::fmt::Display for Layer {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub struct DataType(u16);
impl DataType {
pub const fn new(value: u16) -> Self {
Self(value)
}
pub const fn value(self) -> u16 {
self.0
}
}
impl std::fmt::Display for DataType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}
pub type AngleInRadians = f64;
pub type LayerMapping = std::collections::HashMap<(Layer, DataType), (Layer, DataType)>;