Struct midi_file::file::QuartersPerMinute
source · pub struct QuartersPerMinute(/* private fields */);
Expand description
A more convenient way to specify tempo, not part of the MIDI spec. This is closer to the way
we think of tempo, e.g. “120 Beats per Minute”. This type is locked to quarter-notes so you
will have to translate if your “beat” is not a quarter note. Any u8
greater than zero is
valid.
Implementations§
Trait Implementations§
source§impl Clone for QuartersPerMinute
impl Clone for QuartersPerMinute
source§fn clone(&self) -> QuartersPerMinute
fn clone(&self) -> QuartersPerMinute
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 QuartersPerMinute
impl Debug for QuartersPerMinute
source§impl Default for QuartersPerMinute
impl Default for QuartersPerMinute
source§impl Display for QuartersPerMinute
impl Display for QuartersPerMinute
source§impl From<QuartersPerMinute> for u8
impl From<QuartersPerMinute> for u8
source§fn from(value: QuartersPerMinute) -> u8
fn from(value: QuartersPerMinute) -> u8
Converts to this type from the input type.
source§impl From<u8> for QuartersPerMinute
impl From<u8> for QuartersPerMinute
source§impl Hash for QuartersPerMinute
impl Hash for QuartersPerMinute
source§impl Ord for QuartersPerMinute
impl Ord for QuartersPerMinute
source§fn cmp(&self, other: &QuartersPerMinute) -> Ordering
fn cmp(&self, other: &QuartersPerMinute) -> 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 QuartersPerMinute
impl PartialEq for QuartersPerMinute
source§fn eq(&self, other: &QuartersPerMinute) -> bool
fn eq(&self, other: &QuartersPerMinute) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for QuartersPerMinute
impl PartialOrd for QuartersPerMinute
source§fn partial_cmp(&self, other: &QuartersPerMinute) -> Option<Ordering>
fn partial_cmp(&self, other: &QuartersPerMinute) -> 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 moreimpl Copy for QuartersPerMinute
impl Eq for QuartersPerMinute
impl StructuralEq for QuartersPerMinute
impl StructuralPartialEq for QuartersPerMinute
Auto Trait Implementations§
impl RefUnwindSafe for QuartersPerMinute
impl Send for QuartersPerMinute
impl Sync for QuartersPerMinute
impl Unpin for QuartersPerMinute
impl UnwindSafe for QuartersPerMinute
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