Struct reaper_medium::NormalizedPlayRate
source · [−]pub struct NormalizedPlayRate(_);
Expand description
This represents a play rate measured as value between 0 and 1.
This corresponds to the position on the project play rate slider.
Implementations
sourceimpl NormalizedPlayRate
impl NormalizedPlayRate
sourcepub const MIN: NormalizedPlayRate = _
pub const MIN: NormalizedPlayRate = _
The minimum possible value (a quarter of the normal play speed).
sourcepub const NORMAL: NormalizedPlayRate = _
pub const NORMAL: NormalizedPlayRate = _
The normal playback speed.
sourcepub const MAX: NormalizedPlayRate = _
pub const MAX: NormalizedPlayRate = _
The maximum possible value (four times the normal play speed).
sourcepub fn new(value: f64) -> NormalizedPlayRate
pub fn new(value: f64) -> NormalizedPlayRate
Creates a normalized play rate.
Panics
This function panics if the given value is not within (0.00..=1.00)
.
Trait Implementations
sourceimpl Clone for NormalizedPlayRate
impl Clone for NormalizedPlayRate
sourcefn clone(&self) -> NormalizedPlayRate
fn clone(&self) -> NormalizedPlayRate
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for NormalizedPlayRate
impl Debug for NormalizedPlayRate
sourceimpl Default for NormalizedPlayRate
impl Default for NormalizedPlayRate
sourceimpl Display for NormalizedPlayRate
impl Display for NormalizedPlayRate
sourceimpl PartialEq<NormalizedPlayRate> for NormalizedPlayRate
impl PartialEq<NormalizedPlayRate> for NormalizedPlayRate
sourcefn eq(&self, other: &NormalizedPlayRate) -> bool
fn eq(&self, other: &NormalizedPlayRate) -> bool
sourceimpl PartialOrd<NormalizedPlayRate> for NormalizedPlayRate
impl PartialOrd<NormalizedPlayRate> for NormalizedPlayRate
sourcefn partial_cmp(&self, other: &NormalizedPlayRate) -> Option<Ordering>
fn partial_cmp(&self, other: &NormalizedPlayRate) -> 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 TryFrom<f64> for NormalizedPlayRate
impl TryFrom<f64> for NormalizedPlayRate
impl Copy for NormalizedPlayRate
impl StructuralPartialEq for NormalizedPlayRate
Auto Trait Implementations
impl RefUnwindSafe for NormalizedPlayRate
impl Send for NormalizedPlayRate
impl Sync for NormalizedPlayRate
impl Unpin for NormalizedPlayRate
impl UnwindSafe for NormalizedPlayRate
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
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more