pub enum SparseError {
Show 21 variants
ComputationError(String),
DimensionMismatch {
expected: usize,
found: usize,
},
IndexOutOfBounds {
index: (usize, usize),
shape: (usize, usize),
},
InvalidAxis,
InvalidSliceRange,
InconsistentData {
reason: String,
},
NotImplemented(String),
SingularMatrix(String),
ValueError(String),
ConversionError(String),
OperationNotSupported(String),
ShapeMismatch {
expected: (usize, usize),
found: (usize, usize),
},
IterativeSolverFailure(String),
ConvergenceError(String),
IndexCastOverflow {
value: usize,
target_type: &'static str,
},
InvalidFormat(String),
IoError(Error),
GpuError(GpuError),
CompressionError(String),
Io(String),
BlockNotFound(String),
}
Expand description
Sparse matrix/array error type
Variants§
ComputationError(String)
Computation error (generic error)
DimensionMismatch
Dimension mismatch error
IndexOutOfBounds
Index out of bounds error
InvalidAxis
Invalid axis error
InvalidSliceRange
Invalid slice range error
InconsistentData
Inconsistent data error
NotImplemented(String)
Not implemented error
SingularMatrix(String)
Singular matrix error
ValueError(String)
Value error (invalid value)
ConversionError(String)
Conversion error
OperationNotSupported(String)
Operation not supported error
ShapeMismatch
Shape mismatch error
IterativeSolverFailure(String)
Iterative solver failure error
ConvergenceError(String)
Convergence error for iterative algorithms
IndexCastOverflow
Index cast overflow error
InvalidFormat(String)
Invalid format error
IoError(Error)
I/O error
GpuError(GpuError)
GPU error
CompressionError(String)
Compression error
Io(String)
I/O error with custom message
BlockNotFound(String)
Block not found error
Implementations§
Source§impl SparseError
impl SparseError
Sourcepub fn help_message(&self) -> &'static str
pub fn help_message(&self) -> &'static str
Get a user-friendly description of the error with possible solutions
Sourcepub fn suggestions(&self) -> Vec<&'static str>
pub fn suggestions(&self) -> Vec<&'static str>
Get suggestions for how to fix this error
Sourcepub fn dimension_mismatch_with_context(
expected: usize,
found: usize,
operation: &str,
) -> Self
pub fn dimension_mismatch_with_context( expected: usize, found: usize, operation: &str, ) -> Self
Create a dimension mismatch error with helpful context
Trait Implementations§
Source§impl Debug for SparseError
impl Debug for SparseError
Source§impl Display for SparseError
impl Display for SparseError
Source§impl Error for SparseError
impl Error for SparseError
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()
Source§impl From<Error> for SparseError
impl From<Error> for SparseError
Source§impl From<GpuError> for SparseError
impl From<GpuError> for SparseError
Auto Trait Implementations§
impl Freeze for SparseError
impl !RefUnwindSafe for SparseError
impl Send for SparseError
impl Sync for SparseError
impl Unpin for SparseError
impl !UnwindSafe for SparseError
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> 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