pub enum Isolation {
ReadUncommitted,
ReadCommitted,
RepeatableRead,
Serializable,
}Expand description
事务隔离级别
遵循 SQL 标准四级隔离,从低到高排列(可用于 PartialOrd 比较)。
Variants§
ReadUncommitted
读未提交(最低隔离级别,可能脏读)
ReadCommitted
读已提交(默认级别,无脏读)
RepeatableRead
可重复读(同一事务内多次读取一致)
Serializable
串行化(最高隔离级别,完全隔离)
Trait Implementations§
Source§impl Ord for Isolation
impl Ord for Isolation
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Isolation
impl PartialOrd for Isolation
impl Copy for Isolation
impl Eq for Isolation
impl StructuralPartialEq for Isolation
Auto Trait Implementations§
impl Freeze for Isolation
impl RefUnwindSafe for Isolation
impl Send for Isolation
impl Sync for Isolation
impl Unpin for Isolation
impl UnsafeUnpin for Isolation
impl UnwindSafe for Isolation
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> Comparable<K> for Q
impl<Q, K> Comparable<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: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more