#[non_exhaustive]pub enum ApiObservationError {
ResourceMismatch {
expected: EntityId,
actual: EntityId,
},
ZeroReviewScanLimit,
ReviewScanLimitExceeded {
actual: u16,
maximum: u16,
},
ReviewCursorTooLong {
actual: usize,
maximum: usize,
},
ResourceBoundReviewCursorTooLong {
actual: usize,
maximum: usize,
},
InvalidResourceBoundReviewCursor {
reason: &'static str,
},
UnsupportedResourceBoundReviewCursorVersion,
ResourceBoundReviewCursorMismatch,
ObservationLimitExceeded {
field: &'static str,
actual: usize,
maximum: usize,
},
Knowledge(KnowledgeBaseError),
ReasoningAfterCommit {
commit: Box<ApiObservationCommitReceipt>,
source: RuleEngineError,
},
}Expand description
Failure while accepting or reasoning over an API visibility observation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ResourceMismatch
The observation described a resource outside the host-selected scope.
Fields
ZeroReviewScanLimit
A review query cannot make progress with an empty scan window.
ReviewScanLimitExceeded
A review query exceeded the compiled per-page scan ceiling.
ReviewCursorTooLong
A review cursor exceeded the relation-store identifier ceiling.
Fields
ResourceBoundReviewCursorTooLong
A serialized resource-bound review cursor exceeded its compiled ceiling.
Fields
InvalidResourceBoundReviewCursor
A serialized resource-bound review cursor was not canonical v2 syntax.
UnsupportedResourceBoundReviewCursorVersion
A resource-bound review cursor used an unsupported wire version.
ResourceBoundReviewCursorMismatch
A resource-bound review cursor was replayed against another resource.
ObservationLimitExceeded
An observation field exceeded the review model’s storage ceiling.
Fields
Knowledge(KnowledgeBaseError)
The atomic evidence and relation write failed before anything committed.
ReasoningAfterCommit
Reasoning failed after the observation pair had committed.
Fields
commit: Box<ApiObservationCommitReceipt>Committed observation that must not be retried as if no write occurred.
source: RuleEngineErrorRule evaluation or hypothesis-write failure.
Implementations§
Source§impl ApiObservationError
impl ApiObservationError
Sourcepub fn committed_observation(&self) -> Option<&ApiObservationCommitReceipt>
pub fn committed_observation(&self) -> Option<&ApiObservationCommitReceipt>
Returns the committed observation receipt when failure happened post-commit.
Sourcepub fn into_committed_observation(self) -> Option<ApiObservationCommitReceipt>
pub fn into_committed_observation(self) -> Option<ApiObservationCommitReceipt>
Takes the committed receipt without cloning it.
Sourcepub fn reasoning_source(&self) -> Option<&RuleEngineError>
pub fn reasoning_source(&self) -> Option<&RuleEngineError>
Returns the post-commit reasoning error, when applicable.
Trait Implementations§
Source§impl Debug for ApiObservationError
impl Debug for ApiObservationError
Source§impl Display for ApiObservationError
impl Display for ApiObservationError
Source§impl Error for ApiObservationError
impl Error for ApiObservationError
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()