Enum spectrum_analyzer::FrequencyLimit[][src]

pub enum FrequencyLimit {
    All,
    Min(f32),
    Max(f32),
    Range(f32f32),
}

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).

Min(f32)

Only interested in frequencies f <= 1000Hz for example. Limit is inclusive.

Max(f32)

Only interested in frequencies 10000 <= f for example. Limit is inclusive.

Range(f32f32)

Only interested in frequencies 1000 <= f <= 6777 for example. Both values are inclusive.

Implementations

impl FrequencyLimit[src]

pub fn maybe_min(&self) -> Option<f32>[src]

pub fn maybe_max(&self) -> Option<f32>[src]

pub fn min(&self) -> f32[src]

pub fn max(&self) -> f32[src]

Trait Implementations

impl Clone for FrequencyLimit[src]

impl Copy for FrequencyLimit[src]

impl Debug for FrequencyLimit[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.