pub enum OpError {
ExecutionFailed(String),
Timeout {
timeout_ms: u64,
},
Context(String),
BatchFailed(String),
WrappedClassified {
chain: String,
code: String,
class: AttributionClass,
reason: String,
arg_urn: Option<String>,
},
Aborted(String),
Trigger(String),
Classified {
code: String,
class: AttributionClass,
message: String,
arg_urn: Option<String>,
},
Other(Box<dyn Error + Send + Sync>),
}Variants§
ExecutionFailed(String)
Timeout
Context(String)
BatchFailed(String)
WrappedClassified
A CLASSIFIED failure inside wrapping context (a batch child, a
trigger-wrapped op, …) — the wrapper preserves the origin’s failure
identity instead of flattening it into prose. chain is the wrapping
text (which op, which index) for humans; class/code/reason are the
origin’s, verbatim.
Fields
class: AttributionClassAborted(String)
Trigger(String)
Classified
A failure carrying its FULL identity from the emit source: the
machine-readable code the origin error declares (error_code()),
the failure CLASS it declares (attribution_class() — whose problem it
is), and the leaf human message. Wrapping layers construct this from
classified origins instead of folding everything into prose; the
engine’s run record and retry policy read it structurally.
Fields
class: AttributionClassOther(Box<dyn Error + Send + Sync>)
Implementations§
Source§impl OpError
impl OpError
Sourcepub fn attribution_class(&self) -> AttributionClass
pub fn attribution_class(&self) -> AttributionClass
The failure class this error DECLARES. Classified variants carry
their origin’s declaration; everything else is Internal —
unclassified means “ours”, never a guess (docs/failure-taxonomy.md).
Sourcepub fn failure_code(&self) -> Option<&str>
pub fn failure_code(&self) -> Option<&str>
The machine-readable code declared at the emit source, when the failure carried one.
Sourcepub fn failure_arg_urn(&self) -> Option<&str>
pub fn failure_arg_urn(&self) -> Option<&str>
Media URN of the argument the failure is attributed to, when the
emit source declared one. None for every unclassified variant and
for classified failures whose source could not name a single
offending argument — never guessed here.
Sourcepub fn failure_reason(&self) -> String
pub fn failure_reason(&self) -> String
The LEAF human reason — the origin’s own message for classified failures, the Display chain otherwise.
Trait Implementations§
Source§impl Error for OpError
impl Error for OpError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for OpError
impl !UnwindSafe for OpError
impl Freeze for OpError
impl Send for OpError
impl Sync for OpError
impl Unpin for OpError
impl UnsafeUnpin for OpError
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
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.