Skip to main content

SqliteProjectionStoreError

Enum SqliteProjectionStoreError 

#[non_exhaustive]
pub enum SqliteProjectionStoreError { Sqlite(Error), ConnectionPoisoned, Worker(JoinError), NoRuntime(TryCurrentError), InvalidPosition(i64), InvalidAuthority(String), UnsupportedSchemaVersion { found: u32, supported: u32, }, ForeignBatch, }
Available on crate feature projection-store only.
Expand description

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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.

Fields

§found: u32

The version the file carries.

§supported: u32

The version this build knows.

§

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

§

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

Formats the value using the given formatter. Read more
§

impl Display for SqliteProjectionStoreError

§

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

Formats the value using the given formatter. Read more
§

impl Error for SqliteProjectionStoreError

§

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
§

impl From<Error> for SqliteProjectionStoreError

§

fn from(source: Error) -> Self

Converts to this type from the input type.
§

impl From<JoinError> for SqliteProjectionStoreError

§

fn from(source: JoinError) -> Self

Converts to this type from the input type.
§

impl From<TryCurrentError> for SqliteProjectionStoreError

§

fn from(source: TryCurrentError) -> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.