pub trait IntoNotes {
type Notes: IntoIterator<Item = Note>;
const FROM_INTEGER_PITCHES: bool = false;
// Required method
fn try_into_notes(self) -> Result<Self::Notes>;
}Expand description
Tries to convert a supported chord input into notes.
Implementations are provided for strings, slices, vectors, other chords,
integer pitch inputs, and Option<T>. None converts to an empty note list.
String and integer inputs can fail while constructing pitches or simplifying
enharmonics, so this trait stays explicitly fallible.
Provided Associated Constants§
Sourceconst FROM_INTEGER_PITCHES: bool = false
const FROM_INTEGER_PITCHES: bool = false
Whether this input should be treated as integer-derived pitches.
Required Associated Types§
Sourcetype Notes: IntoIterator<Item = Note>
type Notes: IntoIterator<Item = Note>
Iterator-like collection returned by the conversion.
Required Methods§
Sourcefn try_into_notes(self) -> Result<Self::Notes>
fn try_into_notes(self) -> Result<Self::Notes>
Converts the input into notes.
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.