pub enum MemError {
Show 17 variants
MissingProvenance,
WriteAuthorityViolation {
agent_id: AgentId,
},
MalformedFact {
reason: String,
},
UnknownAgentId {
agent_id: AgentId,
},
ClaimNotFound {
claim_ref: ClaimRef,
},
WriteLockContention {
agent_id: AgentId,
},
SpawnBlocking {
reason: String,
},
AtomicCommitViolation {
agent_id: AgentId,
},
MonotonicityViolation {
agent_id: AgentId,
},
BeliefCacheInconsistency,
IncoherentTemporalWindow {
start: String,
end: String,
},
Persistence {
source: Box<dyn Error + Send + Sync + 'static>,
},
PragmaInitFailed {
reason: String,
},
OracleError {
reason: String,
},
PendingStore {
source: Box<dyn Error + Send + Sync + 'static>,
},
AdjudicationHandleNotFound {
handle_id: Uuid,
},
ConfigurationError {
param: String,
value: String,
reason: String,
},
}Expand description
Top-level error type for the mempill engine. Every invariant violation surfaces as a typed variant here — never silently swallowed.
Variants§
MissingProvenance
Provenance label is absent on the write request.
WriteAuthorityViolation
The caller does not hold write authority for the specified agent_id.
MalformedFact
The fact payload is structurally invalid (empty subject, invalid JSON, etc.).
UnknownAgentId
The supplied agent_id is not recognised by the engine.
ClaimNotFound
The referenced claim does not exist in the store.
WriteLockContention
Single-writer-per-agent-id invariant violated: the write lock is already held.
SpawnBlocking
Returned when a tokio::task::spawn_blocking call fails to join at the EngineHandle async boundary.
AtomicCommitViolation
Partial write detected — atomic commit unit invariant violated.
MonotonicityViolation
Belief changed between reads without an intervening write — fixed-history monotonicity violated.
BeliefCacheInconsistency
Materialized belief cache disagrees with the canonical fold result.
IncoherentTemporalWindow
valid_time_start is after valid_time_end.
Persistence
Underlying persistence adapter returned an error.
PragmaInitFailed
SQLite PRAGMA initialization failed (WAL, FULL sync, foreign keys).
OracleError
Oracle port returned an error during request_adjudication or another oracle call site.
Use OracleError { reason: e.to_string() } — string-reason convention is consistent
across all non-persistence, non-internal error variants.
PendingStore
Pending-adjudication store error from insert_pending or mark_resolved.
AdjudicationHandleNotFound
The adjudication handle is unknown, expired, or has already been resolved.
ConfigurationError
An engine calibration parameter has an invalid value.
Trait Implementations§
Source§impl Error for MemError
impl Error for MemError
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()