pub enum SingleOrDouble<T> {
Single(T),
Double(T),
}Variants§
Single(T)
A generic single state representing single sharp/flat notes
Double(T)
A generic double state representing double sharp/flat notes
Implementations§
Source§impl<T> SingleOrDouble<T>
impl<T> SingleOrDouble<T>
Source§impl<T> SingleOrDouble<T>
impl<T> SingleOrDouble<T>
Trait Implementations§
Source§impl<T> Clone for SingleOrDouble<T>where
T: Clone,
impl<T> Clone for SingleOrDouble<T>where
T: Clone,
Source§fn clone(&self) -> SingleOrDouble<T>
fn clone(&self) -> SingleOrDouble<T>
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<T> Debug for SingleOrDouble<T>where
T: Debug,
impl<T> Debug for SingleOrDouble<T>where
T: Debug,
Source§impl<'_enum, T> From<&'_enum SingleOrDouble<T>> for NoteFlag
impl<'_enum, T> From<&'_enum SingleOrDouble<T>> for NoteFlag
Source§fn from(val: &'_enum SingleOrDouble<T>) -> NoteFlag
fn from(val: &'_enum SingleOrDouble<T>) -> NoteFlag
Converts to this type from the input type.
Source§impl<T> From<SingleOrDouble<T>> for NoteFlag
impl<T> From<SingleOrDouble<T>> for NoteFlag
Source§fn from(val: SingleOrDouble<T>) -> NoteFlag
fn from(val: SingleOrDouble<T>) -> NoteFlag
Converts to this type from the input type.
Source§impl<T> Hash for SingleOrDouble<T>where
T: Hash,
impl<T> Hash for SingleOrDouble<T>where
T: Hash,
Source§impl<T> IntoDiscriminant for SingleOrDouble<T>
impl<T> IntoDiscriminant for SingleOrDouble<T>
Source§type Discriminant = NoteFlag
type Discriminant = NoteFlag
Enum listing the same variants as this enum but without any data fields
fn discriminant(&self) -> <SingleOrDouble<T> as IntoDiscriminant>::Discriminant
Source§impl<T> Ord for SingleOrDouble<T>where
T: Ord,
impl<T> Ord for SingleOrDouble<T>where
T: Ord,
Source§fn cmp(&self, other: &SingleOrDouble<T>) -> Ordering
fn cmp(&self, other: &SingleOrDouble<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialEq for SingleOrDouble<T>where
T: PartialEq,
impl<T> PartialEq for SingleOrDouble<T>where
T: PartialEq,
Source§impl<T> PartialOrd for SingleOrDouble<T>where
T: PartialOrd,
impl<T> PartialOrd for SingleOrDouble<T>where
T: PartialOrd,
impl<T> Copy for SingleOrDouble<T>where
T: Copy,
impl<T> Eq for SingleOrDouble<T>where
T: Eq,
impl<T> StructuralPartialEq for SingleOrDouble<T>
Auto Trait Implementations§
impl<T> Freeze for SingleOrDouble<T>where
T: Freeze,
impl<T> RefUnwindSafe for SingleOrDouble<T>where
T: RefUnwindSafe,
impl<T> Send for SingleOrDouble<T>where
T: Send,
impl<T> Sync for SingleOrDouble<T>where
T: Sync,
impl<T> Unpin for SingleOrDouble<T>where
T: Unpin,
impl<T> UnwindSafe for SingleOrDouble<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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