pub struct BeatsPerMinute(/* private fields */);Expand description
A representation of a tempo, a positive floating point number.
Implementations§
Source§impl BeatsPerMinute
impl BeatsPerMinute
pub fn new(beats_per_minute: f64) -> Result<Self, IllegalBeatsPerMinute>
pub fn get(&self) -> f64
pub fn max(self, other: Self) -> Self
pub fn checked_add(self, other: Self) -> Result<Self, IllegalBeatsPerMinute>
Trait Implementations§
Source§impl Add for BeatsPerMinute
impl Add for BeatsPerMinute
Source§impl AddAssign for BeatsPerMinute
impl AddAssign for BeatsPerMinute
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for BeatsPerMinute
impl Clone for BeatsPerMinute
Source§fn clone(&self) -> BeatsPerMinute
fn clone(&self) -> BeatsPerMinute
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 Debug for BeatsPerMinute
impl Debug for BeatsPerMinute
Source§impl Default for BeatsPerMinute
impl Default for BeatsPerMinute
Source§fn default() -> BeatsPerMinute
fn default() -> BeatsPerMinute
Returns the “default value” for a type. Read more
Source§impl Hash for BeatsPerMinute
impl Hash for BeatsPerMinute
Source§impl Ord for BeatsPerMinute
impl Ord for BeatsPerMinute
Source§impl PartialEq for BeatsPerMinute
impl PartialEq for BeatsPerMinute
Source§impl PartialOrd for BeatsPerMinute
impl PartialOrd for BeatsPerMinute
Source§impl Sum for BeatsPerMinute
impl Sum for BeatsPerMinute
impl Copy for BeatsPerMinute
impl Eq for BeatsPerMinute
impl StructuralPartialEq for BeatsPerMinute
Auto Trait Implementations§
impl Freeze for BeatsPerMinute
impl RefUnwindSafe for BeatsPerMinute
impl Send for BeatsPerMinute
impl Sync for BeatsPerMinute
impl Unpin for BeatsPerMinute
impl UnwindSafe for BeatsPerMinute
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