pub trait AlienErrorData {
// Required methods
fn code(&self) -> &'static str;
fn retryable(&self) -> bool;
fn internal(&self) -> bool;
fn message(&self) -> String;
// Provided methods
fn http_status_code(&self) -> u16 { ... }
fn context(&self) -> Option<Value> { ... }
fn retryable_inherit(&self) -> Option<bool> { ... }
fn internal_inherit(&self) -> Option<bool> { ... }
fn http_status_code_inherit(&self) -> Option<u16> { ... }
fn human_layer_presentation(&self) -> HumanLayerPresentation { ... }
fn hint(&self) -> Option<String> { ... }
}Expand description
Data every public-facing error variant must expose.
Required Methods§
Provided Methods§
Sourcefn http_status_code(&self) -> u16
fn http_status_code(&self) -> u16
HTTP status code for this error (defaults to 500).
Sourcefn retryable_inherit(&self) -> Option<bool>
fn retryable_inherit(&self) -> Option<bool>
Whether to inherit the retryable flag from the source error. Returns None if this error should inherit from source, Some(value) for explicit value.
Sourcefn internal_inherit(&self) -> Option<bool>
fn internal_inherit(&self) -> Option<bool>
Whether to inherit the internal flag from the source error. Returns None if this error should inherit from source, Some(value) for explicit value.
Sourcefn http_status_code_inherit(&self) -> Option<u16>
fn http_status_code_inherit(&self) -> Option<u16>
Whether to inherit the HTTP status code from the source error. Returns None if this error should inherit from source, Some(value) for explicit value.
Sourcefn human_layer_presentation(&self) -> HumanLayerPresentation
fn human_layer_presentation(&self) -> HumanLayerPresentation
Controls whether this error layer should be shown in the default human CLI renderer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".