pub enum SettlementOutcome {
Accepted {
schema: String,
transcript_id: String,
},
Skipped {
schema: String,
reason: SettlementSkipReason,
},
Retryable {
schema: String,
reason: SettlementFailureReason,
},
Permanent {
schema: String,
reason: SettlementFailureReason,
},
}Expand description
Outcome returned by a settlement hook.
Variants§
Accepted
The hook accepted the observation and routed it through the
existing chio-settle/ops.rs pipeline. The opaque transcript
id lets operators correlate the kernel-side observation with
the downstream settlement record.
Fields
Skipped
The receipt requires no settlement work.
Fields
reason: SettlementSkipReasonClosed reason for skipping settlement.
Retryable
The hook rejected the observation with a recoverable failure.
Fields
reason: SettlementFailureReasonBounded failure reason carried across retries.
Permanent
The hook rejected the observation permanently.
Fields
reason: SettlementFailureReasonBounded failure reason carried into the dead letter.
Implementations§
Source§impl SettlementOutcome
impl SettlementOutcome
Sourcepub fn has_supported_schema(&self) -> bool
pub fn has_supported_schema(&self) -> bool
Return whether this outcome uses the schema understood by this build.
Sourcepub fn accepted(transcript_id: impl Into<String>) -> Self
pub fn accepted(transcript_id: impl Into<String>) -> Self
Construct an Accepted outcome with the canonical schema tag.
Sourcepub fn skipped(reason: SettlementSkipReason) -> Self
pub fn skipped(reason: SettlementSkipReason) -> Self
Construct a Skipped outcome with the canonical schema tag.
Sourcepub fn retryable(reason: SettlementFailureReason) -> Self
pub fn retryable(reason: SettlementFailureReason) -> Self
Construct a retryable outcome with the canonical schema tag.
Deterministic failure codes are coerced to Self::Permanent.
Sourcepub fn permanent(reason: SettlementFailureReason) -> Self
pub fn permanent(reason: SettlementFailureReason) -> Self
Construct a Permanent outcome with the canonical schema tag.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Return true for outcomes that the retry policy must replay.
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Return true for outcomes that land directly in the dead-letter
table without further retries.
Trait Implementations§
Source§impl Clone for SettlementOutcome
impl Clone for SettlementOutcome
Source§fn clone(&self) -> SettlementOutcome
fn clone(&self) -> SettlementOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more