pub struct MilliBel(pub i64);
Expand description
Wrapper for a mB (millibel) value.
Despite some ALSA functions named “dB”, they actually take mB values instead. This is a wrapper type to help with those calculations. Its interior is the actual mB value.
Tuple Fields
0: i64
Implementations
Methods from Deref<Target = i64>
Trait Implementations
sourceimpl AddAssign<MilliBel> for MilliBel
impl AddAssign<MilliBel> for MilliBel
sourcefn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresourceimpl Ord for MilliBel
impl Ord for MilliBel
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<MilliBel> for MilliBel
impl PartialOrd<MilliBel> for MilliBel
sourcefn partial_cmp(&self, other: &MilliBel) -> Option<Ordering>
fn partial_cmp(&self, other: &MilliBel) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl SubAssign<MilliBel> for MilliBel
impl SubAssign<MilliBel> for MilliBel
sourcefn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for MilliBel
impl Eq for MilliBel
impl StructuralEq for MilliBel
impl StructuralPartialEq for MilliBel
Auto Trait Implementations
impl RefUnwindSafe for MilliBel
impl Send for MilliBel
impl Sync for MilliBel
impl Unpin for MilliBel
impl UnwindSafe for MilliBel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more