Enum SqliteProjectionStoreError
#[non_exhaustive]pub enum SqliteProjectionStoreError {
Sqlite(Error),
ConnectionPoisoned,
Worker(JoinError),
NoRuntime(TryCurrentError),
InvalidPosition(i64),
InvalidAuthority(String),
UnsupportedSchemaVersion {
found: u32,
supported: u32,
},
ForeignBatch,
}projection-store only.Expand description
How SqliteProjectionStore fails.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sqlite(Error)
The driver failed: I/O, SQLITE_BUSY, a constraint, a bad statement.
ConnectionPoisoned
A thread panicked while holding the connection mutex.
Worker(JoinError)
The blocking task carrying the commit panicked or was cancelled.
A cancelled commit is genuinely ambiguous — SQLite may or may not have
reached COMMIT — which is why it is a distinct variant rather than
folded into Sqlite.
NoRuntime(TryCurrentError)
Called outside a tokio runtime, so no blocking task could be spawned.
InvalidPosition(i64)
A stored checkpoint row carried a position the contract cannot represent;
SequencePosition wraps a NonZeroU64.
InvalidAuthority(String)
A stored checkpoint row carried an authority discriminant this build does not know.
The alternative — resolving it to
Authority::Live — is the one answer that must not be given: it tells a
reader that a read model whose state this build cannot name is
authoritative.
UnsupportedSchemaVersion
The file was written by a build that knows a later projection migration.
ForeignBatch
A batch begun on a different store instance reached
rollback.
commit and reset report the same refusal through their own port-level
variants; rollback returns the adapter’s error, so the refusal needs a
variant of its own here. Discarding it silently was the alternative and it
loses for the reason the port rejects a foreign batch at all: a caller
holding a batch from the wrong store has a bug, and the cheapest place to
learn it is the call that was supposed to clean up.
Trait Implementations§
§impl Debug for SqliteProjectionStoreError
impl Debug for SqliteProjectionStoreError
§impl Display for SqliteProjectionStoreError
impl Display for SqliteProjectionStoreError
§impl Error for SqliteProjectionStoreError
impl Error for SqliteProjectionStoreError
§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()