pub enum ServiceError {
Parse(ParseError),
Analysis(AnalysisError),
Storage(StorageError),
Execution {
message: Cow<'static, str>,
},
Io(Error),
Config {
message: Cow<'static, str>,
},
Timeout {
operation: Cow<'static, str>,
duration: Duration,
},
Concurrency {
message: Cow<'static, str>,
},
Generic {
message: Cow<'static, str>,
},
}Expand description
Main error type for service layer operations with optimized string handling
Variants§
Parse(ParseError)
Errors related to parsing source code
Analysis(AnalysisError)
Errors related to code analysis and pattern matching
Storage(StorageError)
Errors related to storage operations
Execution
Errors related to execution context
Io(Error)
I/O related errors
Config
Configuration errors with optimized string storage
Timeout
Timeout errors with duration context
Concurrency
Concurrency/threading errors
Generic
Generic service errors
Implementations§
Source§impl ServiceError
impl ServiceError
Sourcepub fn execution_static(msg: &'static str) -> Self
pub fn execution_static(msg: &'static str) -> Self
Create execution error with static string (zero allocation)
Sourcepub fn execution_dynamic(msg: String) -> Self
pub fn execution_dynamic(msg: String) -> Self
Create execution error with dynamic string
Sourcepub fn config_static(msg: &'static str) -> Self
pub fn config_static(msg: &'static str) -> Self
Create config error with static string (zero allocation)
Sourcepub fn config_dynamic(msg: String) -> Self
pub fn config_dynamic(msg: String) -> Self
Create config error with dynamic string
Trait Implementations§
Source§impl Debug for ServiceError
impl Debug for ServiceError
Source§impl Display for ServiceError
impl Display for ServiceError
Source§impl Error for ServiceError
impl Error for ServiceError
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<AnalysisError> for ServiceError
impl From<AnalysisError> for ServiceError
Source§fn from(source: AnalysisError) -> Self
fn from(source: AnalysisError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ServiceError
impl From<Error> for ServiceError
Source§impl From<ParseError> for ServiceError
impl From<ParseError> for ServiceError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ServiceError> for ContextualError
impl From<ServiceError> for ContextualError
Source§fn from(error: ServiceError) -> Self
fn from(error: ServiceError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for ServiceError
impl From<StorageError> for ServiceError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Source§impl RecoverableError for ServiceError
impl RecoverableError for ServiceError
Source§fn recovery_info(&self) -> Option<ErrorRecovery>
fn recovery_info(&self) -> Option<ErrorRecovery>
Get recovery information for this error
Source§fn is_retryable(&self) -> bool
fn is_retryable(&self) -> bool
Check if this error is retryable
Source§fn allows_partial(&self) -> bool
fn allows_partial(&self) -> bool
Check if this error allows partial continuation
Auto Trait Implementations§
impl Freeze for ServiceError
impl !RefUnwindSafe for ServiceError
impl Send for ServiceError
impl Sync for ServiceError
impl Unpin for ServiceError
impl UnsafeUnpin for ServiceError
impl !UnwindSafe for ServiceError
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