pub enum TwoPhaseError {
InvalidState(TwoPhaseState),
PrepareFailed {
db_id: DatabaseId,
reason: String,
},
TooManyDatabases {
count: usize,
max: usize,
},
DetachWithActiveTransaction {
db_id: DatabaseId,
},
UnknownDatabase(DatabaseId),
DuplicateDatabase(DatabaseId),
MarkerWriteError(String),
WalIndexUpdateError {
db_id: DatabaseId,
reason: String,
},
NotWalMode(DatabaseId),
}Expand description
Error types for the 2PC protocol.
Variants§
InvalidState(TwoPhaseState)
Attempted operation in wrong protocol state.
PrepareFailed
A participating database failed during prepare.
TooManyDatabases
Too many databases attached (exceeds SQLITE_MAX_ATTACHED).
DetachWithActiveTransaction
Cannot detach a database with an active transaction.
Fields
§
db_id: DatabaseIdUnknownDatabase(DatabaseId)
Database is not a participant in this 2PC.
DuplicateDatabase(DatabaseId)
Database was registered more than once for the same 2PC.
MarkerWriteError(String)
I/O error writing commit marker.
WalIndexUpdateError
I/O error during WAL-index update in Phase 2.
NotWalMode(DatabaseId)
Database is not in WAL mode (required for 2PC).
Trait Implementations§
Source§impl Clone for TwoPhaseError
impl Clone for TwoPhaseError
Source§fn clone(&self) -> TwoPhaseError
fn clone(&self) -> TwoPhaseError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TwoPhaseError
impl Debug for TwoPhaseError
Source§impl Display for TwoPhaseError
impl Display for TwoPhaseError
Source§impl Error for TwoPhaseError
impl Error for TwoPhaseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for TwoPhaseError
impl PartialEq for TwoPhaseError
impl Eq for TwoPhaseError
impl StructuralPartialEq for TwoPhaseError
Auto Trait Implementations§
impl Freeze for TwoPhaseError
impl RefUnwindSafe for TwoPhaseError
impl Send for TwoPhaseError
impl Sync for TwoPhaseError
impl Unpin for TwoPhaseError
impl UnsafeUnpin for TwoPhaseError
impl UnwindSafe for TwoPhaseError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).