Enum basic_dsp_vector::ErrorReason

source ·
pub enum ErrorReason {
Show 14 variants InputMustHaveTheSameSize, InputMetaDataMustAgree, InputMustBeComplex, InputMustBeReal, InputMustBeInTimeDomain, InputMustBeInFrequencyDomain, InvalidArgumentLength, InputMustBeConjSymmetric, InputMustHaveAnOddLength, ArgumentFunctionMustBeSymmetric, InvalidNumberOfArgumentsForCombinedOp, InputMustNotBeEmpty, InputMustHaveAnEvenLength, TypeCanNotResize,
}
Expand description

Enumeration of all error reasons

Variants§

§

InputMustHaveTheSameSize

The operations requires all inputs to have the same size, in most cases this means that the following must be true: self.len() == argument.len()

§

InputMetaDataMustAgree

The operations requires all inputs to have the same meta data. For a vector this means that the following must be true: self.is_complex() == argument.is_complex() && self.domain() == argument.domain() && self.delta()== argument.domain(); Consider to convert one of the inputs so that this condition is true. The necessary operations may include FFT/IFFT, complex/real conversion and resampling.

§

InputMustBeComplex

The operation requires the input to be complex.

§

InputMustBeReal

The operation requires the input to be real.

§

InputMustBeInTimeDomain

The operation requires the input to be in time domain.

§

InputMustBeInFrequencyDomain

The operation requires the input to be in frequency domain.

§

InvalidArgumentLength

The arguments have an invalid length to perform the operation. The operations documentation should have more information about the requirements. Please open a defect if this isn’t the case.

§

InputMustBeConjSymmetric

The operations is only valid if the data input contains half of a symmetric spectrum. The symmetry definition follows soon however more important is that the element at 0 Hz which happens to be the first vector element must be real. The error message is raised if this is violated, the rest of the definition is only listed here for completeness snce it can’t be checked. The required symmetry for a vector is that for every point vector[x].conj() == vector[-x](pseudocode) where x is the x-axis position relative to 0 Hz and conj is the complex conjugate.

§

InputMustHaveAnOddLength

self.points() must be an odd number.

§

ArgumentFunctionMustBeSymmetric

The function passed as argument must be symmetric

§

InvalidNumberOfArgumentsForCombinedOp

The number of arguments passed into a combined operation methods doesn’t match with the number of arguments specified previously via the add_op methods.

§

InputMustNotBeEmpty

The operation isn’t specified for an empty vector.

§

InputMustHaveAnEvenLength

Given input must have an even length.

§

TypeCanNotResize

The arguments would require that the type allocates larger memory. But the type can’t do that.

Trait Implementations§

source§

impl Clone for ErrorReason

source§

fn clone(&self) -> ErrorReason

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ErrorReason

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for ErrorReason

source§

fn eq(&self, other: &ErrorReason) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for ErrorReason

source§

impl StructuralPartialEq for ErrorReason

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.