pub trait IntervalOps {
type Output;
Show 26 methods
// Required methods
fn add_interval<I: IntoInterval>(&self, interval: I) -> Self::Output;
fn sub_interval<I: IntoInterval>(&self, interval: I) -> Self::Output;
// Provided methods
fn add_semitone(&self) -> Self::Output { ... }
fn sub_semitone(&self) -> Self::Output { ... }
fn add_tone(&self) -> Self::Output { ... }
fn sub_tone(&self) -> Self::Output { ... }
fn add_major_third(&self) -> Self::Output { ... }
fn sub_major_third(&self) -> Self::Output { ... }
fn add_minor_third(&self) -> Self::Output { ... }
fn sub_minor_third(&self) -> Self::Output { ... }
fn add_perfect_fifth(&self) -> Self::Output { ... }
fn sub_perfect_fifth(&self) -> Self::Output { ... }
fn add_augmented_fifth(&self) -> Self::Output { ... }
fn sub_augmented_fifth(&self) -> Self::Output { ... }
fn add_diminished_fifth(&self) -> Self::Output { ... }
fn sub_diminished_fifth(&self) -> Self::Output { ... }
fn add_augmented_seventh(&self) -> Self::Output { ... }
fn sub_augmented_seventh(&self) -> Self::Output { ... }
fn add_diminished_seventh(&self) -> Self::Output { ... }
fn sub_diminished_seventh(&self) -> Self::Output { ... }
fn add_major_seventh(&self) -> Self::Output { ... }
fn sub_major_seventh(&self) -> Self::Output { ... }
fn add_minor_seventh(&self) -> Self::Output { ... }
fn sub_minor_seventh(&self) -> Self::Output { ... }
fn add_octave(&self) -> Self::Output { ... }
fn sub_octave(&self) -> Self::Output { ... }
}Expand description
IntervalOps is a trait for objects capable of basic arithmetic with intervals.
Required Associated Types§
Required Methods§
Sourcefn add_interval<I: IntoInterval>(&self, interval: I) -> Self::Output
fn add_interval<I: IntoInterval>(&self, interval: I) -> Self::Output
Add an interval to the given object
Sourcefn sub_interval<I: IntoInterval>(&self, interval: I) -> Self::Output
fn sub_interval<I: IntoInterval>(&self, interval: I) -> Self::Output
Subtract an interval from the given object
Provided Methods§
fn add_semitone(&self) -> Self::Output
fn sub_semitone(&self) -> Self::Output
fn add_tone(&self) -> Self::Output
fn sub_tone(&self) -> Self::Output
fn add_major_third(&self) -> Self::Output
fn sub_major_third(&self) -> Self::Output
fn add_minor_third(&self) -> Self::Output
fn sub_minor_third(&self) -> Self::Output
fn add_perfect_fifth(&self) -> Self::Output
fn sub_perfect_fifth(&self) -> Self::Output
fn add_augmented_fifth(&self) -> Self::Output
fn sub_augmented_fifth(&self) -> Self::Output
fn add_diminished_fifth(&self) -> Self::Output
fn sub_diminished_fifth(&self) -> Self::Output
fn add_augmented_seventh(&self) -> Self::Output
fn sub_augmented_seventh(&self) -> Self::Output
fn add_diminished_seventh(&self) -> Self::Output
fn sub_diminished_seventh(&self) -> Self::Output
fn add_major_seventh(&self) -> Self::Output
fn sub_major_seventh(&self) -> Self::Output
fn add_minor_seventh(&self) -> Self::Output
fn sub_minor_seventh(&self) -> Self::Output
fn add_octave(&self) -> Self::Output
fn sub_octave(&self) -> Self::Output
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.