Struct audio_time::SampleRate
source · #[repr(transparent)]pub struct SampleRate(_);
Expand description
Audio sampling rate, the number of samples in a single second (i.e. measured in hertz).
Implementations§
source§impl SampleRate
impl SampleRate
pub const fn new(n: NonZeroU32) -> Self
pub const fn get(&self) -> NonZeroU32
Trait Implementations§
source§impl Clone for SampleRate
impl Clone for SampleRate
source§const fn clone(&self) -> SampleRate
const fn clone(&self) -> SampleRate
Returns a copy 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 SampleRate
impl Debug for SampleRate
source§impl Display for SampleRate
impl Display for SampleRate
source§impl From<NonZeroU32> for SampleRate
impl From<NonZeroU32> for SampleRate
source§const fn from(value: NonZeroU32) -> Self
const fn from(value: NonZeroU32) -> Self
Converts to this type from the input type.
source§impl From<SampleRate> for NonZeroU32
impl From<SampleRate> for NonZeroU32
source§const fn from(value: SampleRate) -> Self
const fn from(value: SampleRate) -> Self
Converts to this type from the input type.
source§impl Hash for SampleRate
impl Hash for SampleRate
source§impl Ord for SampleRate
impl Ord for SampleRate
source§fn cmp(&self, other: &SampleRate) -> Ordering
fn cmp(&self, other: &SampleRate) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<SampleRate> for SampleRate
impl PartialEq<SampleRate> for SampleRate
source§fn eq(&self, other: &SampleRate) -> bool
fn eq(&self, other: &SampleRate) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SampleRate> for SampleRate
impl PartialOrd<SampleRate> for SampleRate
source§fn partial_cmp(&self, other: &SampleRate) -> Option<Ordering>
fn partial_cmp(&self, other: &SampleRate) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 more