Trait redact_composer_musical::NoteIterator

source ·
pub trait NoteIterator {
    // Required method
    fn iter_notes_in_range<R: RangeBounds<Note>>(
        &self,
        note_range: R
    ) -> NoteIter<R> ;

    // Provided method
    fn notes_in_range<R: RangeBounds<Note>>(&self, note_range: R) -> Vec<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§

source

fn iter_notes_in_range<R: RangeBounds<Note>>( &self, note_range: R ) -> NoteIter<R>

Returns a note iterator (NoteIter) for notes of an interval pattern within the given note range.

Provided Methods§

source

fn notes_in_range<R: RangeBounds<Note>>(&self, note_range: R) -> Vec<Note>

Returns all notes matching an interval pattern within the given note range.

Object Safety§

This trait is not object safe.

Implementors§