pub trait NoteIterator {
// Required method
fn iter_notes_in_range<R>(&self, note_range: R) -> NoteIter<R> ⓘ
where R: RangeBounds<Note>;
// Provided method
fn notes_in_range<R>(&self, note_range: R) -> Vec<Note>
where R: RangeBounds<Note> { ... }
}Expand description
Provides iteration over notes of specific patterns (e.g. scale/chord) within a given note range.
When implementing this trait, only Self::iter_notes_in_range is required. The default implementation of
Self::notes_in_range simply collects these into a Vec.
Required Methods§
Sourcefn iter_notes_in_range<R>(&self, note_range: R) -> NoteIter<R> ⓘwhere
R: RangeBounds<Note>,
fn iter_notes_in_range<R>(&self, note_range: R) -> NoteIter<R> ⓘwhere
R: RangeBounds<Note>,
Returns a note iterator (NoteIter) for notes of an interval pattern within the given note range.
Provided Methods§
Sourcefn notes_in_range<R>(&self, note_range: R) -> Vec<Note>where
R: RangeBounds<Note>,
fn notes_in_range<R>(&self, note_range: R) -> Vec<Note>where
R: RangeBounds<Note>,
Returns all notes matching an interval pattern within the given note range.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.