pub struct PlaybackRate(/* private fields */);Expand description
Audio playback rate multiplier; 1.0 is normal speed. Values
0.25..=4.0 cover all reasonable use cases on every platform.
Implementations§
Source§impl PlaybackRate
impl PlaybackRate
Sourcepub fn new(value: f32) -> Result<Self, OutOfRange>
pub fn new(value: f32) -> Result<Self, OutOfRange>
Constructs a new value, validating the range.
§Errors
Returns OutOfRange if value is NaN or outside the
valid range.
Sourcepub const fn new_unchecked(value: f32) -> Self
pub const fn new_unchecked(value: f32) -> Self
Constructs without validation.
The caller must ensure value lies within the valid range.
Trait Implementations§
Source§impl Clone for PlaybackRate
impl Clone for PlaybackRate
Source§fn clone(&self) -> PlaybackRate
fn clone(&self) -> PlaybackRate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PlaybackRate
Source§impl Debug for PlaybackRate
impl Debug for PlaybackRate
Source§impl Display for PlaybackRate
impl Display for PlaybackRate
Source§impl PartialEq for PlaybackRate
impl PartialEq for PlaybackRate
Source§impl PartialOrd for PlaybackRate
impl PartialOrd for PlaybackRate
impl StructuralPartialEq for PlaybackRate
Auto Trait Implementations§
impl Freeze for PlaybackRate
impl RefUnwindSafe for PlaybackRate
impl Send for PlaybackRate
impl Sync for PlaybackRate
impl Unpin for PlaybackRate
impl UnsafeUnpin for PlaybackRate
impl UnwindSafe for PlaybackRate
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