pub enum NumRs2Error {
Show 22 variants
ShapeMismatch {
expected: Vec<usize>,
actual: Vec<usize>,
},
DimensionMismatch(String),
InvalidOperation(String),
ValueError(String),
IndexError(String),
BlasError(i32),
LapackError(String),
ConversionError(String),
TypeCastError(String),
IndexOutOfBounds(String),
ComputationError(String),
SerializationError(String),
DeserializationError(String),
IOError(String),
NotImplemented(String),
RuntimeError(String),
AllocationFailed(String),
FeatureNotEnabled(String),
Core(CoreError),
Computation(ComputationError),
Memory(MemoryError),
IO(IOError),
}Expand description
NumRS2 error types (legacy structure for backward compatibility)
Variants§
ShapeMismatch
DimensionMismatch(String)
InvalidOperation(String)
ValueError(String)
IndexError(String)
BlasError(i32)
LapackError(String)
ConversionError(String)
TypeCastError(String)
IndexOutOfBounds(String)
ComputationError(String)
SerializationError(String)
DeserializationError(String)
IOError(String)
NotImplemented(String)
RuntimeError(String)
AllocationFailed(String)
FeatureNotEnabled(String)
Core(CoreError)
Computation(ComputationError)
Memory(MemoryError)
IO(IOError)
Implementations§
Source§impl NumRs2Error
impl NumRs2Error
Sourcepub fn category(&self) -> ErrorCategory
pub fn category(&self) -> ErrorCategory
Get the error category for this error
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Get the severity level of this error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable
Sourcepub fn with_context<C: Into<OperationContext>>(
self,
context: C,
) -> ErrorContext<Self>
pub fn with_context<C: Into<OperationContext>>( self, context: C, ) -> ErrorContext<Self>
Create a new error with context information
Sourcepub fn at_location(self, location: ErrorLocation) -> ErrorContext<Self>
pub fn at_location(self, location: ErrorLocation) -> ErrorContext<Self>
Create a new error with location information
Trait Implementations§
Source§impl Debug for NumRs2Error
impl Debug for NumRs2Error
Source§impl Display for NumRs2Error
impl Display for NumRs2Error
Source§impl Error for NumRs2Error
impl Error for NumRs2Error
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<Box<ErrorKind>> for NumRs2Error
Implement From<Boxbincode::ErrorKind> for NumRs2Error
impl From<Box<ErrorKind>> for NumRs2Error
Implement From<Boxbincode::ErrorKind> for NumRs2Error
Source§impl From<ComputationError> for NumRs2Error
impl From<ComputationError> for NumRs2Error
Source§fn from(source: ComputationError) -> Self
fn from(source: ComputationError) -> Self
Converts to this type from the input type.
Source§impl From<CoreError> for NumRs2Error
impl From<CoreError> for NumRs2Error
Source§impl From<IOError> for NumRs2Error
impl From<IOError> for NumRs2Error
Source§impl From<MemoryError> for NumRs2Error
impl From<MemoryError> for NumRs2Error
Source§fn from(source: MemoryError) -> Self
fn from(source: MemoryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NumRs2Error
impl RefUnwindSafe for NumRs2Error
impl Send for NumRs2Error
impl Sync for NumRs2Error
impl Unpin for NumRs2Error
impl UnwindSafe for NumRs2Error
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.