Enum SessionError
pub enum SessionError {
MutationGap {
client_id: String,
expected: u64,
got: u64,
},
ProducerGap {
producer: String,
expected: u64,
got: u64,
},
PayloadTooLarge(String),
RetryableConflict(String),
Backend(String),
CommitOutcomeExpired,
CursorHistoryLost(String),
}Expand description
The engine’s error type — only the variants the state machine distinguishes and the wire
renders. Each backend maps its native error in at the boundary (SessionBackend methods
return these), keeping the engine monomorphic; MutationGap’s Display is byte-identical
to rindle-server’s ServerError::MutationGap so the extraction changes no response body.
Variants§
MutationGap
ProducerGap
A foreign writer submitted a sequence beyond its watermark’s successor. The watermark model requires a per-producer total order (design 306 §4), so this is the producer’s protocol violation — the mid-gap rule, in the producer namespace.
PayloadTooLarge(String)
The backend rejected an otherwise valid transaction because its atomic payload exceeds the configured engine policy. This is a client-shape error (HTTP 413), not a retryable backend failure; callers must split the work into smaller transactions.
RetryableConflict(String)
Serializable OCC validation rejected the transaction at commit. The transaction has already been rolled back; a read-bearing mutator must re-run from its first statement so its reads are established against a fresh snapshot.
Backend(String)
Any backend-side failure, carrying the backend error’s display string. Statement errors, commit failures, capture errors — the engine treats them all as “poison the session” (rollback, advance nothing, surface the message).
CommitOutcomeExpired
The durable terminal record aged below the configured retention floor. The transaction may have committed, but the server can no longer prove either outcome and must never report a guaranteed negative.
CursorHistoryLost(String)
A session/strong read-only begin named a commit fence beyond the current master history.
Trait Implementations§
§impl Clone for SessionError
impl Clone for SessionError
§fn clone(&self) -> SessionError
fn clone(&self) -> SessionError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SessionError
impl Debug for SessionError
§impl Display for SessionError
impl Display for SessionError
§impl Error for SessionError
impl Error for SessionError
1.30.0 · Source§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()
§impl PartialEq for SessionError
impl PartialEq for SessionError
impl Eq for SessionError
impl StructuralPartialEq for SessionError
Auto Trait Implementations§
impl Freeze for SessionError
impl RefUnwindSafe for SessionError
impl Send for SessionError
impl Sync for SessionError
impl Unpin for SessionError
impl UnsafeUnpin for SessionError
impl UnwindSafe for SessionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.