pub struct EdgeCaseHandler { /* private fields */ }
Expand description
Comprehensive edge case handler
Implementations§
Source§impl EdgeCaseHandler
impl EdgeCaseHandler
Sourcepub fn new(config: EdgeCaseConfig) -> Self
pub fn new(config: EdgeCaseConfig) -> Self
Create new edge case handler
Sourcepub fn handle_edge_case(
&self,
case_type: EdgeCaseType,
severity: EdgeCaseSeverity,
description: String,
context: HashMap<String, String>,
) -> TrackingResult<u64>
pub fn handle_edge_case( &self, case_type: EdgeCaseType, severity: EdgeCaseSeverity, description: String, context: HashMap<String, String>, ) -> TrackingResult<u64>
Handle an edge case occurrence
Sourcepub fn get_edge_case(
&self,
case_id: u64,
) -> TrackingResult<Arc<EdgeCaseOccurrence>>
pub fn get_edge_case( &self, case_id: u64, ) -> TrackingResult<Arc<EdgeCaseOccurrence>>
Get edge case by ID
Sourcepub fn get_cases_by_type(
&self,
case_type: &EdgeCaseType,
) -> Vec<Arc<EdgeCaseOccurrence>>
pub fn get_cases_by_type( &self, case_type: &EdgeCaseType, ) -> Vec<Arc<EdgeCaseOccurrence>>
Get all edge cases of a specific type
Sourcepub fn get_stats(&self) -> TrackingResult<EdgeCaseStats>
pub fn get_stats(&self) -> TrackingResult<EdgeCaseStats>
Get edge case statistics
Sourcepub fn get_case_counts(&self) -> HashMap<EdgeCaseType, u64>
pub fn get_case_counts(&self) -> HashMap<EdgeCaseType, u64>
Get case counts by type
Sourcepub fn register_recovery_strategy<F>(
&self,
case_type: EdgeCaseType,
strategy: F,
)
pub fn register_recovery_strategy<F>( &self, case_type: EdgeCaseType, strategy: F, )
Register a custom recovery strategy
Sourcepub fn clear_cases(&self)
pub fn clear_cases(&self)
Clear all stored edge cases
Auto Trait Implementations§
impl !Freeze for EdgeCaseHandler
impl !RefUnwindSafe for EdgeCaseHandler
impl Send for EdgeCaseHandler
impl Sync for EdgeCaseHandler
impl Unpin for EdgeCaseHandler
impl !UnwindSafe for EdgeCaseHandler
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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