euphony_units/pitch/mode/
system.rs

1use crate::pitch::mode::intervals::ModeIntervals;
2
3#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord, Hash)]
4pub struct ModeSystem(pub &'static [ModeIntervals]);
5
6impl ModeSystem {
7    pub const fn new(intervals: &'static [ModeIntervals]) -> Self {
8        Self(intervals)
9    }
10}
11
12impl core::ops::Deref for ModeSystem {
13    type Target = [ModeIntervals];
14
15    fn deref(&self) -> &Self::Target {
16        self.0
17    }
18}