Rindle docs and package mapSkip to main content

ReplicaError

Enum ReplicaError 

pub enum ReplicaError {
    Sqlite {
        op: &'static str,
        source: Error,
    },
    Rindle(RindleError),
    Build(BuildError),
    UnsupportedColumnType {
        table: String,
        column: String,
    },
    Open(String),
    Schema(String),
    ReadRejected(String),
    Capture(String),
    Mutation(String),
    NotThreadsafe,
    Closed,
}
Expand description

Everything the write plane — and the rindle-replica IVM half above it — can fail with. Wraps the engine’s own errors verbatim (Rindle / Build) and adds the wrapper-level faults (connection open, capability asserts, unsupported columns).

Variants§

§

Sqlite

A SQLite call failed; op names the operation for context.

Fields

§op: &'static str
§source: Error
§

Rindle(RindleError)

An engine runtime error (push/hydrate/storage/consistency), surfaced verbatim.

§

Build(BuildError)

The query could not be lowered — surfaced synchronously at registration.

§

UnsupportedColumnType

A column type the engine cannot represent (e.g. BLOB — OwnedValue has no Blob variant). Rejected at register_table/query rather than silently coerced.

Fields

§table: String
§column: String
§

Open(String)

Opening / configuring the database failed in a way that isn’t a raw SQLite error (e.g. journal_mode did not become wal2 — typically a non-file path).

§

Schema(String)

Table schema discovery failed (e.g. the table doesn’t exist, or has no primary key, which the engine requires for row identity).

§

ReadRejected(String)

A raw read (ReadConn::read_sql) tripped a guardrail — it returned more rows than the cap. (A time-budget overrun surfaces as an interrupted Sqlite instead.)

§

Capture(String)

A row change could not be captured from the preupdate hook (e.g. invalid UTF-8 in a TEXT/BLOB cell, or a column-count mismatch). Surfaced at commit.

§

Mutation(String)

A client-mutation push violated the protocol (a mid gap, client-mutations support not enabled, …). Distinct from a rejected mutation, which is a normal outcome reported in MutationOutcome::rejected.

§

NotThreadsafe

sqlite3_threadsafe() returned 0 — the build is single-threaded-unsafe.

§

Closed

The replica has been closed / a worker is gone.

Implementations§

§

impl ReplicaError

pub fn sqlite(op: &'static str, source: Error) -> ReplicaError

Trait Implementations§

§

impl Debug for ReplicaError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReplicaError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReplicaError

§

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<BuildError> for ReplicaError

§

fn from(e: BuildError) -> ReplicaError

Converts to this type from the input type.
§

impl From<CdcError> for ReplicaError

§

fn from(e: CdcError) -> ReplicaError

Converts to this type from the input type.
Source§

impl From<ReplicaError> for DdlMigrationError

Source§

fn from(error: ReplicaError) -> DdlMigrationError

Converts to this type from the input type.
Source§

impl From<ReplicaError> for MutationReject

Source§

fn from(e: ReplicaError) -> MutationReject

Converts to this type from the input type.
§

impl From<ReplicaError> for WritePlaneError

Classify failures from the WAL2 replica backend at the shared boundary. Keeping this next to WritePlaneError means every standalone adapter uses the same public error semantics.

§

fn from(error: ReplicaError) -> WritePlaneError

Converts to this type from the input type.
§

impl From<RindleError> for ReplicaError

§

fn from(e: RindleError) -> ReplicaError

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> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,