pub struct VolumeLinear(pub f64);
Expand description
Software volume expressed as linear factor.
Tuple Fields§
§0: f64
Implementations§
Trait Implementations§
Source§impl Clone for VolumeLinear
impl Clone for VolumeLinear
Source§fn clone(&self) -> VolumeLinear
fn clone(&self) -> VolumeLinear
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 VolumeLinear
impl Debug for VolumeLinear
Source§impl Default for VolumeLinear
impl Default for VolumeLinear
Source§impl From<Volume> for VolumeLinear
Converts a volume to a linear factor.
impl From<Volume> for VolumeLinear
Converts a volume to a linear factor.
This is only valid for software volumes!
Source§impl From<VolumeDB> for VolumeLinear
Converts a decibel value (amplitude, not power) to a linear factor.
impl From<VolumeDB> for VolumeLinear
Converts a decibel value (amplitude, not power) to a linear factor.
This is only valid for software volumes!
Source§impl From<VolumeLinear> for Volume
Converts a linear factor to a volume.
impl From<VolumeLinear> for Volume
Converts a linear factor to a volume.
0.0
and less is muted while 1.0
is Volume::NORMAL
.
This is only valid for software volumes!
Source§fn from(v: VolumeLinear) -> Self
fn from(v: VolumeLinear) -> Self
Converts to this type from the input type.
Source§impl From<VolumeLinear> for VolumeDB
Converts a linear factor to a decibel value (amplitude, not power).
impl From<VolumeLinear> for VolumeDB
Converts a linear factor to a decibel value (amplitude, not power).
0.0
and less is muted while 1.0
is Volume::NORMAL
.
This is only valid for software volumes!
Source§fn from(v: VolumeLinear) -> Self
fn from(v: VolumeLinear) -> Self
Converts to this type from the input type.
Source§impl PartialEq for VolumeLinear
impl PartialEq for VolumeLinear
Source§impl PartialOrd for VolumeLinear
impl PartialOrd for VolumeLinear
impl Copy for VolumeLinear
impl StructuralPartialEq for VolumeLinear
Auto Trait Implementations§
impl Freeze for VolumeLinear
impl RefUnwindSafe for VolumeLinear
impl Send for VolumeLinear
impl Sync for VolumeLinear
impl Unpin for VolumeLinear
impl UnwindSafe for VolumeLinear
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