Rindle docs and package mapSkip to main content

WritePlaneError

Enum WritePlaneError 

pub enum WritePlaneError {
    SqlSurface(StatementRunError),
    Sqlite(Error),
    Conflict(String),
    TooLarge(String),
    Capture(String),
    Wire(String),
    StoreFormat(String),
    Divergence(String),
    Backend {
        status: u16,
        message: String,
    },
}
Expand description

The one-shot write plane’s error currency (extraction plan, decision C3). Classification into this enum happens exactly once per host — the replicator’s exhaustive From<MasterError> — and rendering happens exactly once, in render_public_sql_error / render_public_script_error, so the typed public codes and the SQLITE_ERROR/sqlite_code classification can never be collapsed into strings and reconstructed. There is deliberately NO conversion out of this type: helpers that both hosts and the coordinator call return BookkeepingError instead, so the one-way promise is enforced by the type graph.

Variants§

§

SqlSurface(StatementRunError)

A typed failure from the public statement surface — status via statement_sql_error_status, code/message/sqlite_code from the error itself.

§

Sqlite(Error)

400 SQLITE_ERROR with the extended sqlite_code.

§

Conflict(String)

409 TRANSACTION_CONFLICT + SQLITE_BUSY_SNAPSHOT, retry_scope “closure”, transaction_state “closed”.

§

TooLarge(String)

413 RESULT_LIMIT — the one-shot rendering of the host’s transaction-size cap (NOT TRANSACTION_TOO_LARGE; that string belongs to the session/deploy-batch codes).

§

Capture(String)

400 VALUE_UNSUPPORTED.

§

Wire(String)

400 STATEMENT_FAILED, “malformed row change: {m}”.

§

StoreFormat(String)

500 STATEMENT_FAILED, “store format: {m}”.

§

Divergence(String)

400 STATEMENT_FAILED, “silent-divergence guard: {m}”.

§

Backend

Host-classified everything-else, rendered STATEMENT_FAILED at the status the host chose. Only a host’s classification (From<MasterError>) mints this — no shared helper does, which is why no conversion out of WritePlaneError can exist.

Fields

§status: u16
§message: String

Trait Implementations§

§

impl Debug for WritePlaneError

§

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

Formats the value using the given formatter. Read more
§

impl From<BookkeepingError> for WritePlaneError

§

fn from(error: BookkeepingError) -> WritePlaneError

Converts to this type from the input type.
Source§

impl From<DdlMigrationError> for WritePlaneError

A DDL/migration failure raised here has to surface through writeplane’s public SQL error body. The impl lives beside DdlMigrationError because it is the local type — impl From<Local> for Foreign is what the orphan rule permits.

Source§

fn from(error: DdlMigrationError) -> WritePlaneError

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.

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, 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,