Skip to main content

MemError

Enum MemError 

Source
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.

Fields

§agent_id: AgentId

The agent ID that the caller attempted to write on behalf of.

§

MalformedFact

The fact payload is structurally invalid (empty subject, invalid JSON, etc.).

Fields

§reason: String

Human-readable description of the malformation.

§

UnknownAgentId

The supplied agent_id is not recognised by the engine.

Fields

§agent_id: AgentId

The unrecognised agent ID.

§

ClaimNotFound

The referenced claim does not exist in the store.

Fields

§claim_ref: ClaimRef

The claim reference that was not found.

§

WriteLockContention

Single-writer-per-agent-id invariant violated: the write lock is already held.

Fields

§agent_id: AgentId

The agent ID whose write lock is already held.

§

SpawnBlocking

Returned when a tokio::task::spawn_blocking call fails to join at the EngineHandle async boundary.

Fields

§reason: String

Description of the join error.

§

AtomicCommitViolation

Partial write detected — atomic commit unit invariant violated.

Fields

§agent_id: AgentId

The agent ID for which the partial write was detected.

§

MonotonicityViolation

Belief changed between reads without an intervening write — fixed-history monotonicity violated.

Fields

§agent_id: AgentId

The agent ID for which monotonicity was violated.

§

BeliefCacheInconsistency

Materialized belief cache disagrees with the canonical fold result.

§

IncoherentTemporalWindow

valid_time_start is after valid_time_end.

Fields

§start: String

The valid-time start (RFC3339).

§end: String

The valid-time end (RFC3339).

§

Persistence

Underlying persistence adapter returned an error.

Fields

§source: Box<dyn Error + Send + Sync + 'static>

The wrapped persistence error.

§

PragmaInitFailed

SQLite PRAGMA initialization failed (WAL, FULL sync, foreign keys).

Fields

§reason: String

Description of the PRAGMA failure.

§

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.

Fields

§reason: String

Description of the oracle error.

§

PendingStore

Pending-adjudication store error from insert_pending or mark_resolved.

Fields

§source: Box<dyn Error + Send + Sync + 'static>

The wrapped pending-store error.

§

AdjudicationHandleNotFound

The adjudication handle is unknown, expired, or has already been resolved.

Fields

§handle_id: Uuid

The handle UUID that was not found.

§

ConfigurationError

An engine calibration parameter has an invalid value.

Fields

§param: String

The parameter name.

§value: String

The invalid value.

§reason: String

Why the value is invalid.

Trait Implementations§

Source§

impl Debug for MemError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MemError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for MemError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Box<dyn Error + Sync + Send>> for MemError

Source§

fn from(source: Box<dyn Error + Send + Sync + 'static>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.