#[non_exhaustive]pub enum CoreError {
Network(Error),
Json(Error),
ServiceNotFound(String),
ServiceCreationFailed(String),
ServiceError(String),
InvalidServiceConfig(String),
MessageConversionFailed(String),
RateLimitExceeded {
retry_after: Duration,
},
ServiceReturnedError {
service: String,
status_code: Option<u16>,
message: String,
},
RetryExhausted(String),
}Expand description
Most common error types
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Network(Error)
An HTTP or network-level failure from the underlying reqwest client.
Json(Error)
JSON serialization or deserialization failed.
ServiceNotFound(String)
Service not found in registry.
ServiceCreationFailed(String)
Service creation failed.
ServiceError(String)
Service returned an error.
InvalidServiceConfig(String)
Invalid service configuration.
MessageConversionFailed(String)
Message conversion failed.
RateLimitExceeded
Rate limit exceeded.
ServiceReturnedError
Service returned an error with status code.
RetryExhausted(String)
All retry attempts failed.
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for CoreError
impl !UnwindSafe for CoreError
impl Freeze for CoreError
impl Send for CoreError
impl Sync for CoreError
impl Unpin for CoreError
impl UnsafeUnpin for CoreError
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