Enum spectrum_analyzer::FrequencyLimit
source · [−]Expand description
Can be used to specify a desired frequency limit. If you know that you only
need frequencies f <= 1000Hz
, 1000 <= f <= 6777
, or 10000 <= f
, then this
can help you to accelerate overall computation speed and memory usage.
Please note that due to frequency inaccuracies the FFT result may not contain
a value for 1000Hz
but for 998.76Hz
!
Variants
All
Interested in all frequencies. [0, sampling_rate/2] (Nyquist theorem). Semantically equivalent to “None” limit at all).
Min(f32)
Only interested in frequencies Frequency <= x
. Limit is inclusive.
Supported values are 0 <= x <= Nyquist-Frequency
.
Max(f32)
Only interested in frequencies x <= Frequency
. Limit is inclusive.
Supported values are 0 <= x <= N
.
Range(f32, f32)
Only interested in frequencies 1000 <= f <= 6777
for example. Both values are inclusive.
The first value of the tuple is equivalent to FrequencyLimit::Min
and the latter
equivalent to FrequencyLimit::Max
. Furthermore, the first value must not be
bigger than the second value.
Implementations
sourceimpl FrequencyLimit
impl FrequencyLimit
sourcepub fn min(&self) -> f32
pub fn min(&self) -> f32
Returns the minimum value, panics if it’s none.
Unwrapped version of Self::maybe_min
.
sourcepub fn max(&self) -> f32
pub fn max(&self) -> f32
Returns the minimum value, panics if it’s none.
Unwrapped version of Self::maybe_max
.
Trait Implementations
sourceimpl Clone for FrequencyLimit
impl Clone for FrequencyLimit
sourcefn clone(&self) -> FrequencyLimit
fn clone(&self) -> FrequencyLimit
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FrequencyLimit
impl Debug for FrequencyLimit
impl Copy for FrequencyLimit
Auto Trait Implementations
impl RefUnwindSafe for FrequencyLimit
impl Send for FrequencyLimit
impl Sync for FrequencyLimit
impl Unpin for FrequencyLimit
impl UnwindSafe for FrequencyLimit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more