Enum midi_file::core::DurationName
source · #[repr(u8)]pub enum DurationName {
Whole = 0,
Half = 1,
Quarter = 2,
Eighth = 3,
Sixteenth = 4,
D32 = 5,
D64 = 6,
D128 = 7,
D256 = 8,
D512 = 9,
D1024 = 10,
}
Expand description
DurationName
is used when specifying the denominator of a crate::file::TimeSignatureValue
.
When defining time signatures, the MIDI file spec says:
The denominator is a negative power of two: 2 represents a quarter-note, 3 represents an'
eighth-note, etc.
Variants§
Whole = 0
Whole Note / Semibreve
Half = 1
Half Note / Minim
Quarter = 2
Quarter Note / Crotchet
Eighth = 3
Eighth Note / Quaver
Sixteenth = 4
Sixteenth note / Semiquaver
D32 = 5
Thirty-Second Note / Demisemiquaver
D64 = 6
Sixty-Fourth Note / Hemidemisemiquaver
D128 = 7
One-Twenty-Eighth Note / Semihemidemisemiquaver
D256 = 8
Two-Fifty-Sixth Note / Demisemihemidemisemiquaver
D512 = 9
Five-Twelfth Note
D1024 = 10
One Thousand Twenty-Fourth Note
Trait Implementations§
source§impl Clone for DurationName
impl Clone for DurationName
source§fn clone(&self) -> DurationName
fn clone(&self) -> DurationName
Returns a copy 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 DurationName
impl Debug for DurationName
source§impl Default for DurationName
impl Default for DurationName
source§fn default() -> DurationName
fn default() -> DurationName
Returns the “default value” for a type. Read more
source§impl Hash for DurationName
impl Hash for DurationName
source§impl Ord for DurationName
impl Ord for DurationName
source§fn cmp(&self, other: &DurationName) -> Ordering
fn cmp(&self, other: &DurationName) -> 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 PartialEq for DurationName
impl PartialEq for DurationName
source§fn eq(&self, other: &DurationName) -> bool
fn eq(&self, other: &DurationName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DurationName
impl PartialOrd for DurationName
source§fn partial_cmp(&self, other: &DurationName) -> Option<Ordering>
fn partial_cmp(&self, other: &DurationName) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<u8> for DurationName
impl TryFrom<u8> for DurationName
impl Copy for DurationName
impl Eq for DurationName
impl StructuralEq for DurationName
impl StructuralPartialEq for DurationName
Auto Trait Implementations§
impl RefUnwindSafe for DurationName
impl Send for DurationName
impl Sync for DurationName
impl Unpin for DurationName
impl UnwindSafe for DurationName
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