pub enum SettlementHookError {
InvalidObservation(String),
Transient(String),
Permanent(String),
Pipeline(SettlementError),
}Expand description
Errors that may surface from a SettlementHook. All variants are
fail-closed: the paired observer runtime preserves their typed disposition
for durable routing, while the dispatch path is never rolled back.
Variants§
InvalidObservation(String)
The supplied observation was malformed.
Transient(String)
The downstream settlement pipeline reported a transient error.
Implementations SHOULD prefer SettlementOutcome::Retryable
over surfacing this variant; it is provided for hooks that
cannot classify the failure synchronously.
Permanent(String)
The downstream settlement pipeline reported a permanent error.
Pipeline(SettlementError)
A lower-level SettlementError surfaced from the ops pipeline.
Implementations§
Source§impl SettlementHookError
impl SettlementHookError
Sourcepub fn classification(
&self,
) -> (SettlementFailureClass, SettlementFailureReason)
pub fn classification( &self, ) -> (SettlementFailureClass, SettlementFailureReason)
Return the retry disposition and bounded reason for this error.
Trait Implementations§
Source§impl Debug for SettlementHookError
impl Debug for SettlementHookError
Source§impl Display for SettlementHookError
impl Display for SettlementHookError
Source§impl Error for SettlementHookError
impl Error for SettlementHookError
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<SettlementError> for SettlementHookError
impl From<SettlementError> for SettlementHookError
Source§fn from(source: SettlementError) -> Self
fn from(source: SettlementError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SettlementHookError
impl RefUnwindSafe for SettlementHookError
impl Send for SettlementHookError
impl Sync for SettlementHookError
impl Unpin for SettlementHookError
impl UnsafeUnpin for SettlementHookError
impl UnwindSafe for SettlementHookError
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> 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.