pub struct UnifiedErrorHandler { /* private fields */ }Expand description
Unified error handling facade providing comprehensive error management
Implementations§
Source§impl UnifiedErrorHandler
impl UnifiedErrorHandler
Sourcepub fn create_error(
&self,
code: ErrorCode,
operation: impl Into<String>,
message: impl Into<String>,
) -> EnhancedError
pub fn create_error( &self, code: ErrorCode, operation: impl Into<String>, message: impl Into<String>, ) -> EnhancedError
Create and record a comprehensive error with automatic diagnostics
Sourcepub fn create_validation_error(
&self,
code: ErrorCode,
operation: impl Into<String>,
parameter_name: &str,
parameter_value: impl Display,
validation_message: impl Into<String>,
) -> EnhancedError
pub fn create_validation_error( &self, code: ErrorCode, operation: impl Into<String>, parameter_name: &str, parameter_value: impl Display, validation_message: impl Into<String>, ) -> EnhancedError
Create error with parameter validation and automatic suggestions
Sourcepub fn validate_array_or_error<T>(
&self,
data: &[T],
name: &str,
operation: &str,
) -> StatsResult<()>where
T: PartialOrd + Copy,
pub fn validate_array_or_error<T>(
&self,
data: &[T],
name: &str,
operation: &str,
) -> StatsResult<()>where
T: PartialOrd + Copy,
Validate array and create appropriate error if validation fails
Sourcepub fn validate_finite_array_or_error(
&self,
data: &[f64],
name: &str,
operation: &str,
) -> StatsResult<()>
pub fn validate_finite_array_or_error( &self, data: &[f64], name: &str, operation: &str, ) -> StatsResult<()>
Validate finite array and create appropriate error if validation fails
Sourcepub fn validate_probability_or_error(
&self,
value: f64,
name: &str,
operation: &str,
) -> StatsResult<()>
pub fn validate_probability_or_error( &self, value: f64, name: &str, operation: &str, ) -> StatsResult<()>
Validate probability and create appropriate error if validation fails
Sourcepub fn validate_positive_or_error(
&self,
value: f64,
name: &str,
operation: &str,
) -> StatsResult<()>
pub fn validate_positive_or_error( &self, value: f64, name: &str, operation: &str, ) -> StatsResult<()>
Validate positive value and create appropriate error if validation fails
Sourcepub fn generate_comprehensive_report(
&self,
error: &StatsError,
context: Option<&str>,
) -> String
pub fn generate_comprehensive_report( &self, error: &StatsError, context: Option<&str>, ) -> String
Generate a comprehensive error report with diagnostics
Sourcepub fn get_health_status(&self) -> HealthReport
pub fn get_health_status(&self) -> HealthReport
Get current system health status
Sourcepub fn requires_immediate_attention(&self) -> bool
pub fn requires_immediate_attention(&self) -> bool
Check if system requires immediate attention
Sourcepub fn print_health_summary(&self)
pub fn print_health_summary(&self)
Print health summary to console
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnifiedErrorHandler
impl RefUnwindSafe for UnifiedErrorHandler
impl Send for UnifiedErrorHandler
impl Sync for UnifiedErrorHandler
impl Unpin for UnifiedErrorHandler
impl UnwindSafe for UnifiedErrorHandler
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.