Enum spectrum_analyzer::error::SpectrumAnalyzerError[][src]

pub enum SpectrumAnalyzerError {
    TooFewSamples,
    NaNValuesNotSupported,
    InfinityValuesNotSupported,
    InvalidFrequencyLimit(FrequencyLimitError),
    SamplesLengthNotAPowerOfTwo,
    ScalingError(f32f32),
}
Expand description

Describes main errors of the library. Almost all errors are caused by wrong input.

Variants

TooFewSamples

There must be at least two samples.

NaNValuesNotSupported

NaN values in samples are not supported!

InfinityValuesNotSupported

Infinity-values (regarding floating point representation) in samples are not supported!

InvalidFrequencyLimit(FrequencyLimitError)

Tuple Fields of InvalidFrequencyLimit

0: FrequencyLimitError
SamplesLengthNotAPowerOfTwo

The number of samples must be a power of two in order for the FFT to be fast and, depending on the used FFT implementation, to work at all.

ScalingError(f32f32)

After applying the scaling function on a specific item, the returned value is either infinity or NaN, according to IEEE-754. This is invalid. Check your scaling function!

Tuple Fields of ScalingError

0: f321: f32

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.