#[non_exhaustive]pub enum SqliteBegin {
Deferred,
Immediate,
Exclusive,
}Expand description
SQLite’s begin modes — not isolation levels, and named so nobody can mistake them for a portable knob.
SQLite has one isolation level (serializable); what it lets you choose is when the transaction takes its locks. Asking for one of these on PostgreSQL or MySQL is an error, not a no-op.
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.
Deferred
Locks are taken at the first statement that needs them. The default.
Immediate
The write lock is taken at BEGIN, so a write-write conflict surfaces
as TxConflict::Busy immediately instead of mid-transaction.
Exclusive
As IMMEDIATE, and other connections cannot read either (outside WAL).
Implementations§
Trait Implementations§
Source§impl Clone for SqliteBegin
impl Clone for SqliteBegin
Source§fn clone(&self) -> SqliteBegin
fn clone(&self) -> SqliteBegin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SqliteBegin
Source§impl Debug for SqliteBegin
impl Debug for SqliteBegin
impl Eq for SqliteBegin
Source§impl From<SqliteBegin> for TxOptions
impl From<SqliteBegin> for TxOptions
Source§fn from(mode: SqliteBegin) -> Self
fn from(mode: SqliteBegin) -> Self
Converts to this type from the input type.
Source§impl Hash for SqliteBegin
impl Hash for SqliteBegin
Source§impl PartialEq for SqliteBegin
impl PartialEq for SqliteBegin
impl StructuralPartialEq for SqliteBegin
Auto Trait Implementations§
impl Freeze for SqliteBegin
impl RefUnwindSafe for SqliteBegin
impl Send for SqliteBegin
impl Sync for SqliteBegin
impl Unpin for SqliteBegin
impl UnsafeUnpin for SqliteBegin
impl UnwindSafe for SqliteBegin
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