pub enum PitchName {
Name(String),
Number(FloatType),
}Expand description
Input accepted as a pitch name or pitch-space number.
Variants§
Name(String)
A written pitch name such as "C#4" or "E-".
Number(FloatType)
A pitch-space number, where 60 corresponds to middle C.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PitchName
impl<'de> Deserialize<'de> for PitchName
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<i32> for PitchName
impl From<i32> for PitchName
Source§fn from(value: IntegerType) -> Self
fn from(value: IntegerType) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for PitchName
Auto Trait Implementations§
impl Freeze for PitchName
impl RefUnwindSafe for PitchName
impl Send for PitchName
impl Sync for PitchName
impl Unpin for PitchName
impl UnsafeUnpin for PitchName
impl UnwindSafe for PitchName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more