pub trait RawChord {
type Elem;
// Required methods
fn as_slice(&self) -> &[Self::Elem];
fn len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
The RawChord trait works to define a basic interface shared by all compatible
reprsentations of a chord. Since a chord is essentially a sequence of pitches, the trait
captures this behavior through association with an element type.