Trait IsolationLevel
pub trait IsolationLevel:
Sealed
+ Copy
+ Default
+ Send
+ Sync
+ 'static {
const NAME: &'static str;
const REFRESH_SNAPSHOT_PER_STATEMENT: bool;
const FIRST_COMMITTER_WINS: bool;
const VALIDATES_READS: bool;
}Expand description
A transaction isolation level.
Sealed: implementing a new level requires engine support, so this trait is not extensible from outside the crate.
Required Associated Constants§
const REFRESH_SNAPSHOT_PER_STATEMENT: bool
const REFRESH_SNAPSHOT_PER_STATEMENT: bool
Whether a fresh snapshot is taken before each statement rather than once
at begin.
const FIRST_COMMITTER_WINS: bool
const FIRST_COMMITTER_WINS: bool
Whether the engine must check for write-write conflicts against versions
committed after this transaction’s snapshot. False only for
ReadCommitted, which re-reads the latest version before writing.
const VALIDATES_READS: bool
const VALIDATES_READS: bool
Whether reads are recorded and re-checked at commit. True only for
Serializable.
A const so the engine’s read path can branch on it and have the
branch compiled away — the weaker levels emit no read-recording code,
register no SIREAD locks, and allocate nothing.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".