pub enum AlteredInterval {
Second,
Fourth,
Fifth,
Sixth,
Seventh,
Ninth,
Tenth,
Eleventh,
Thirteenth,
}Expand description
Represents the interval of an alteration. Used in ChordAlter enum.
Variants§
Second
“2” interval
Fourth
“4” interval
Fifth
“5” interval
Sixth
“6” interval
Seventh
“7” interval
Ninth
“9” interval
Tenth
“10” interval
Eleventh
“11” interval
Thirteenth
“13” interval
Implementations§
Source§impl AlteredInterval
impl AlteredInterval
Sourcepub fn from_usize(num: usize) -> Option<AlteredInterval>
pub fn from_usize(num: usize) -> Option<AlteredInterval>
Tries to parse a usize numer into AlteredInterval.
§Examples
use chord_parser::chord::*;
assert_eq!(Some(AlteredInterval::Second), AlteredInterval::from_usize(2));
assert_eq!(Some(AlteredInterval::Ninth), AlteredInterval::from_usize(9));
assert_eq!(Some(AlteredInterval::Thirteenth), AlteredInterval::from_usize(13));
assert_eq!(None, AlteredInterval::from_usize(15)); // Invalid inputTrait Implementations§
Source§impl Clone for AlteredInterval
impl Clone for AlteredInterval
Source§fn clone(&self) -> AlteredInterval
fn clone(&self) -> AlteredInterval
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AlteredInterval
impl Debug for AlteredInterval
Source§impl PartialEq for AlteredInterval
impl PartialEq for AlteredInterval
Source§impl ToString for AlteredInterval
impl ToString for AlteredInterval
impl Eq for AlteredInterval
impl StructuralPartialEq for AlteredInterval
Auto Trait Implementations§
impl Freeze for AlteredInterval
impl RefUnwindSafe for AlteredInterval
impl Send for AlteredInterval
impl Sync for AlteredInterval
impl Unpin for AlteredInterval
impl UnwindSafe for AlteredInterval
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more