Skip to main content

Module error_kind

Module error_kind 

Source
Expand description

ErrorKind enum for programmatic error matching

Provides a lightweight, copyable enum that mirrors CoreError variants without carrying payload, enabling efficient match / if-based dispatch.

§Usage

use scirs2_core::error::{CoreError, ErrorContext};
use scirs2_core::error::error_kind::ErrorKind;

let err = CoreError::DimensionError(ErrorContext::new("shape mismatch"));
assert_eq!(err.kind(), ErrorKind::Dimension);
assert!(err.kind().is_shape_related());

Enums§

ErrorKind
Lightweight classification of CoreError variants.