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,
},
NotImplemented {
feature: 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
NotImplemented
Feature not yet implemented
Generic
Generic error with context
Implementations§
Source§impl WaveletError
impl WaveletError
Sourcepub 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
Sourcepub 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
Sourcepub 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
Sourcepub 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
Sourcepub 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
Sourcepub fn io_error(operation: impl Into<String>, reason: impl Into<String>) -> Self
pub fn io_error(operation: impl Into<String>, reason: impl Into<String>) -> Self
Create an IoError
Sourcepub 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
Sourcepub fn not_implemented(feature: impl Into<String>) -> Self
pub fn not_implemented(feature: impl Into<String>) -> Self
Create a NotImplemented error
Sourcepub 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
Sourcepub 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§
Source§impl Clone for WaveletError
impl Clone for WaveletError
Source§fn clone(&self) -> WaveletError
fn clone(&self) -> WaveletError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WaveletError
impl Debug for WaveletError
Source§impl Display for WaveletError
impl Display for WaveletError
Source§impl Error for WaveletError
impl Error for WaveletError
1.30.0 · 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 WaveletError
impl RefUnwindSafe for WaveletError
impl Send for WaveletError
impl Sync for WaveletError
impl Unpin for WaveletError
impl UnwindSafe for WaveletError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§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 moreSource§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