Expand description
The error surface of the persistence contract.
Every store speaks StoreError from turnframe-core and nothing else, so
the runtime classifies persistence failures uniformly (see
turnframe_core::error::ErrorClassification). The variants and the meaning
this crate attaches to them:
| Variant | Meaning in this contract |
|---|---|
NotFound | The addressed record does not exist for this account. An id that belongs to another tenant produces exactly the same error (spec §25.4). |
Conflict | A uniqueness rule or a compare-and-swap precondition failed: a second blocking interaction on a case, a status transition from the wrong state, a duplicate identifier, an outbox key already enqueued. |
Unavailable | The backend could not be reached; nothing was written. Retryable. |
Timeout | The backend did not answer in time; the write may have landed. Callers must re-read, never blindly retry (spec §16.5). |
Serialization | A payload could not be encoded or decoded at the storage boundary. |
Corrupt | Stored data violates an invariant the adapter relies on (including a poisoned lock in the in-memory store). |
Other { code } | A refusal identified by a stable code from codes. |
Display output of every variant is safe to log: identifiers and codes only.
Modules§
- codes
- Stable codes carried by
StoreError::Otherwhen this contract refuses a request before touching storage.
Enums§
- Store
Error - Errors raised by persistence adapters.
Functions§
- bundle_
account_ mismatch - Builds the
codes::BUNDLE_ACCOUNT_MISMATCHrefusal. - has_
code - Returns
truewhenerrorisStoreError::Otherwith exactlycode. - identity_
mismatch - Builds the
codes::IDENTITY_MISMATCHrefusal. - invalid_
record - Builds the
codes::INVALID_RECORDrefusal.
Type Aliases§
- Store
Result - Shorthand for the result of a store operation.