pub struct ModuleError {
pub code: ErrorCode,
pub message: String,
pub details: HashMap<String, Value>,
pub cause: Option<String>,
pub trace_id: Option<String>,
pub timestamp: DateTime<Utc>,
pub retryable: Option<bool>,
pub ai_guidance: Option<String>,
pub user_fixable: Option<bool>,
pub suggestion: Option<String>,
}Expand description
Structured error returned by module execution.
Fields§
§code: ErrorCode§message: String§details: HashMap<String, Value>§cause: Option<String>§trace_id: Option<String>§timestamp: DateTime<Utc>§retryable: Option<bool>§ai_guidance: Option<String>§user_fixable: Option<bool>§suggestion: Option<String>Implementations§
Source§impl ModuleError
impl ModuleError
pub fn new(code: ErrorCode, message: impl Into<String>) -> Self
pub fn with_details(self, details: HashMap<String, Value>) -> Self
pub fn with_cause(self, cause: impl Into<String>) -> Self
pub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
pub fn with_ai_guidance(self, ai_guidance: impl Into<String>) -> Self
pub fn with_retryable(self, retryable: bool) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn config_namespace_duplicate(name: &str) -> Self
pub fn config_namespace_reserved(name: &str) -> Self
pub fn config_env_prefix_conflict(prefix: &str) -> Self
pub fn config_env_map_conflict(env_var: &str, owner: &str) -> Self
pub fn config_mount_error(namespace: &str, reason: &str) -> Self
pub fn config_bind_error(namespace: &str, reason: &str) -> Self
pub fn error_formatter_duplicate(adapter_name: &str) -> Self
pub fn pipeline_abort(step: &str, explanation: Option<&str>) -> Self
pub fn step_not_found(message: impl Into<String>) -> Self
pub fn step_not_removable(message: impl Into<String>) -> Self
pub fn step_not_replaceable(message: impl Into<String>) -> Self
pub fn step_name_duplicate(message: impl Into<String>) -> Self
pub fn strategy_not_found(message: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for ModuleError
impl Clone for ModuleError
Source§fn clone(&self) -> ModuleError
fn clone(&self) -> ModuleError
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 ModuleError
impl Debug for ModuleError
Source§impl<'de> Deserialize<'de> for ModuleError
impl<'de> Deserialize<'de> for ModuleError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ModuleError
impl Display for ModuleError
Source§impl Error for ModuleError
impl Error for ModuleError
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 ModuleError
impl From<Error> for ModuleError
Auto Trait Implementations§
impl Freeze for ModuleError
impl RefUnwindSafe for ModuleError
impl Send for ModuleError
impl Sync for ModuleError
impl Unpin for ModuleError
impl UnsafeUnpin for ModuleError
impl UnwindSafe for ModuleError
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<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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.