Enum WaveletError
pub enum WaveletError {
InvalidLength {
expected: usize,
actual: usize,
context: String,
},
SignalTooShort {
minimum: usize,
actual: usize,
operation: String,
},
InvalidParameter {
parameter: String,
value: String,
reason: String,
},
AllocationError {
size: usize,
alignment: usize,
context: String,
},
TransformError {
transform_type: String,
reason: String,
},
IoError {
path: Option<String>,
operation: String,
reason: String,
},
InvalidDecompositionLevel {
requested: usize,
maximum: usize,
},
BoundaryError {
mode: String,
reason: String,
},
ReconstructionError {
reason: String,
},
NumericError {
operation: String,
detail: String,
},
Generic {
message: String,
context: Option<String>,
},
}Expand description
Main error type for the wavelet library
Variants§
InvalidLength
Invalid signal length for the operation
SignalTooShort
Signal is too short for the requested operation
InvalidParameter
Invalid parameter value
AllocationError
Memory allocation error
TransformError
Transform error
IoError
IO error
InvalidDecompositionLevel
Decomposition level error
BoundaryError
Boundary handling error
ReconstructionError
Reconstruction error
NumericError
Numeric overflow or underflow
Generic
Generic error with context
Implementations§
§impl WaveletError
impl WaveletError
pub fn invalid_length(
expected: usize,
actual: usize,
context: impl Into<String>,
) -> Self
pub fn invalid_length( expected: usize, actual: usize, context: impl Into<String>, ) -> Self
Create an InvalidLength error with context
pub fn signal_too_short(
minimum: usize,
actual: usize,
operation: impl Into<String>,
) -> Self
pub fn signal_too_short( minimum: usize, actual: usize, operation: impl Into<String>, ) -> Self
Create a SignalTooShort error
pub fn invalid_parameter(
parameter: impl Into<String>,
value: impl Display,
reason: impl Into<String>,
) -> Self
pub fn invalid_parameter( parameter: impl Into<String>, value: impl Display, reason: impl Into<String>, ) -> Self
Create an InvalidParameter error
pub fn allocation_error(
size: usize,
alignment: usize,
context: impl Into<String>,
) -> Self
pub fn allocation_error( size: usize, alignment: usize, context: impl Into<String>, ) -> Self
Create an AllocationError
pub fn transform_error(
transform_type: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn transform_error( transform_type: impl Into<String>, reason: impl Into<String>, ) -> Self
Create a TransformError
pub fn io_error_with_path(
path: impl Into<String>,
operation: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn io_error_with_path( path: impl Into<String>, operation: impl Into<String>, reason: impl Into<String>, ) -> Self
Create an IoError with a path
pub fn generic_with_context(
message: impl Into<String>,
context: impl Into<String>,
) -> Self
pub fn generic_with_context( message: impl Into<String>, context: impl Into<String>, ) -> Self
Create a Generic error with context
pub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Add context to any error
Trait Implementations§
§impl Clone for WaveletError
impl Clone for WaveletError
§fn clone(&self) -> WaveletError
fn clone(&self) -> WaveletError
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for WaveletError
impl Debug for WaveletError
§impl Display for WaveletError
impl Display for WaveletError
§impl Error for WaveletError
impl Error for WaveletError
1.30.0§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§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 WaveletError
impl RefUnwindSafe for WaveletError
impl Send for WaveletError
impl Sync for WaveletError
impl Unpin for WaveletError
impl UnwindSafe for WaveletError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> IntoEither for T
impl<T> IntoEither for T
§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.