pub enum ChessEngineError {
Show 16 variants
InvalidPosition(String),
DatabaseError(String),
VectorError(String),
SearchError(String),
NeuralNetworkError(String),
TrainingError(String),
IoError(String),
ConfigurationError(String),
FeatureNotAvailable(String),
ResourceExhausted(String),
RetryExhausted {
operation: String,
attempts: u32,
last_error: String,
},
Timeout {
operation: String,
duration_ms: u64,
},
ValidationError {
field: String,
value: String,
expected: String,
},
ChainedError {
source: Box<ChessEngineError>,
context: String,
},
CircuitBreakerOpen {
operation: String,
failures: u32,
},
MemoryLimitExceeded {
requested_mb: usize,
available_mb: usize,
limit_mb: usize,
},
}Expand description
Custom error types for the chess engine with enhanced resilience support
Variants§
InvalidPosition(String)
Invalid chess position or move
DatabaseError(String)
Database operation failed
VectorError(String)
Vector operation failed
SearchError(String)
Search operation failed or timed out
NeuralNetworkError(String)
Neural network operation failed
TrainingError(String)
Training operation failed
IoError(String)
File I/O operation failed
ConfigurationError(String)
Configuration error
FeatureNotAvailable(String)
Feature not available (e.g., GPU acceleration)
ResourceExhausted(String)
Resource exhausted (memory, time, etc.)
RetryExhausted
Operation failed after maximum retries
Timeout
Timeout error with details
ValidationError
Validation error with context
ChainedError
Chained error with context
CircuitBreakerOpen
Circuit breaker is open
MemoryLimitExceeded
Memory limit exceeded
Trait Implementations§
Source§impl Clone for ChessEngineError
impl Clone for ChessEngineError
Source§fn clone(&self) -> ChessEngineError
fn clone(&self) -> ChessEngineError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChessEngineError
impl Debug for ChessEngineError
Source§impl Display for ChessEngineError
impl Display for ChessEngineError
Source§impl Error for ChessEngineError
impl Error for ChessEngineError
1.30.0 · 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 ChessEngineError
impl From<Error> for ChessEngineError
Source§impl From<Error> for ChessEngineError
impl From<Error> for ChessEngineError
Source§impl From<ParseFloatError> for ChessEngineError
impl From<ParseFloatError> for ChessEngineError
Source§fn from(error: ParseFloatError) -> Self
fn from(error: ParseFloatError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for ChessEngineError
impl From<ParseIntError> for ChessEngineError
Source§fn from(error: ParseIntError) -> Self
fn from(error: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ChessEngineError
impl RefUnwindSafe for ChessEngineError
impl Send for ChessEngineError
impl Sync for ChessEngineError
impl Unpin for ChessEngineError
impl UnwindSafe for ChessEngineError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<E> Fail for E
impl<E> Fail for E
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace carried by this failure, if it
carries one. Read moreSource§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