pub trait ForgeError:
Error
+ Send
+ Sync
+ 'static {
// Required methods
fn kind(&self) -> &'static str;
fn caption(&self) -> &'static str;
// Provided methods
fn is_retryable(&self) -> bool { ... }
fn is_fatal(&self) -> bool { ... }
fn status_code(&self) -> u16 { ... }
fn exit_code(&self) -> i32 { ... }
fn user_message(&self) -> String { ... }
fn dev_message(&self) -> String { ... }
fn backtrace(&self) -> Option<&Backtrace> { ... }
fn register(&self) { ... }
}
Expand description
Base trait for all custom error variants.
Required Methods§
Provided Methods§
Sourcefn is_retryable(&self) -> bool
fn is_retryable(&self) -> bool
Returns true if the operation can be retried
Sourcefn status_code(&self) -> u16
fn status_code(&self) -> u16
Returns an appropriate HTTP status code for the error
Sourcefn user_message(&self) -> String
fn user_message(&self) -> String
Returns a user-facing message that can be shown to end users
Sourcefn dev_message(&self) -> String
fn dev_message(&self) -> String
Returns a detailed technical message for developers/logs