Skip to main content

Module error

Module error 

Source
Expand description

Types for working with errors produced by es-entity.

Structs§

CursorDestructureError
NotFound
A repo op that requires a row (find_by_*) found none. There is no NotFound rejection — callers that tolerate absence use maybe_find_by_*, which returns Option instead. Construct one and propagate it with ?: it converts into any errlanes::Fault or errlanes::Fail<D> as Fatal(Invariant).

Enums§

ConstraintKind
The kind of database constraint behind a classified ConstraintViolation.
EntityHydrationError
Error type for entity hydration failures (reconstructing entities from events).

Functions§

extract_constraint_value
Extracts the conflicting value from a database error’s constraint violation.
extract_events_pkey_id_value
Extracts the conflicting id from an events-table primary-key violation.

Type Aliases§

RepoFault
Transient or fatal, never rejected: every read, and every write whose statement can hit no constraint (see RepositoryOptions::update_can_reject in the macro crate for exactly which generated updates qualify). Reads cannot reject or deny; optional reads represent absence with None.
RepoWriteError
Repository write failures, with C carrying the typed constraint violation. Writes may reject, fail transiently, or fail fatally, but cannot deny.