Skip to main content

wxy_domain/
dim.rs

1//! Dimensions: named axes of index space.
2
3/// A named axis of index space.
4#[derive(Debug, Clone, PartialEq, Eq, Hash)]
5pub struct Dim {
6    pub name: String,
7    pub size: u64,
8}
9
10impl Dim {
11    pub fn new(name: impl Into<String>, size: u64) -> Self {
12        Self {
13            name: name.into(),
14            size,
15        }
16    }
17}