rstmt_core/chords/
chord_base.rs1use super::RawChord;
7
8pub type ChordSlice<T> = ChordBase<[T], T>;
9
10pub type ChordArray<T, const N: usize> = ChordBase<[T; N], T>;
11
12pub type ChordSliceRef<'a, T> = ChordBase<&'a [T], T>;
13
14pub type ChordSliceMut<'a, T> = ChordBase<&'a mut [T], T>;
15
16#[cfg(feature = "alloc")]
17pub type Chord<T> = ChordBase<alloc::vec::Vec<T>, T>;
20
21#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
23#[cfg_attr(
24 feature = "serde",
25 derive(serde::Deserialize, serde::Serialize),
26 serde(deny_unknown_fields, rename_all = "snake_case")
27)]
28#[repr(C)]
29pub struct ChordBase<R, T = <R as RawChord>::Elem>
30where
31 R: ?Sized + RawChord<Elem = T>,
32{
33 pub(crate) repr: R,
34}