pub enum SpectrumAnalyzerError {
InvalidLengthOfSamples,
InvalidSamplingRate,
NaNValuesNotSupported,
InfinityValuesNotSupported,
InvalidFrequencyLimit(FrequencyLimitError),
FrequencyLimitTooNarrow,
ScalingError(f32, f32),
}Expand description
Describes main errors of the library. Almost all errors are caused by wrong input.
Variants§
InvalidLengthOfSamples
The amount of samples must be a power of 2, at least 2, and no more than 32768.
InvalidSamplingRate
The sampling rate must not be zero.
NaNValuesNotSupported
NaN values in samples are not supported!
InfinityValuesNotSupported
Infinity-values (regarding floating point representation) in samples are not supported!
InvalidFrequencyLimit(FrequencyLimitError)
The frequency is invalid. See FrequencyLimitError.
FrequencyLimitTooNarrow
The frequency limit is valid in isolation but leaves too few frequency bins for a spectrum.
ScalingError(f32, f32)
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!
Trait Implementations§
Source§impl Debug for SpectrumAnalyzerError
impl Debug for SpectrumAnalyzerError
Source§impl Display for SpectrumAnalyzerError
impl Display for SpectrumAnalyzerError
Source§impl Error for SpectrumAnalyzerError
impl Error for SpectrumAnalyzerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SpectrumAnalyzerError
impl RefUnwindSafe for SpectrumAnalyzerError
impl Send for SpectrumAnalyzerError
impl Sync for SpectrumAnalyzerError
impl Unpin for SpectrumAnalyzerError
impl UnsafeUnpin for SpectrumAnalyzerError
impl UnwindSafe for SpectrumAnalyzerError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more