pub enum PropagationBehavior {
Required,
Mandatory,
Never,
Supports,
RequiresNew,
Nested,
}Expand description
事务传播行为
Variants§
Required
如果当前存在事务,则加入;否则新建事务(默认)
Mandatory
必须在事务中执行,否则抛出异常
Never
必须在没有事务的环境中执行,否则抛出异常
Supports
如果当前存在事务,则加入;否则无事务执行
RequiresNew
总是新建事务,挂起当前事务
Nested
如果当前存在事务,则嵌套执行(保存点);否则新建事务
Trait Implementations§
Source§impl Clone for PropagationBehavior
impl Clone for PropagationBehavior
Source§fn clone(&self) -> PropagationBehavior
fn clone(&self) -> PropagationBehavior
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 PropagationBehavior
Source§impl Debug for PropagationBehavior
impl Debug for PropagationBehavior
Source§impl Default for PropagationBehavior
impl Default for PropagationBehavior
Source§fn default() -> PropagationBehavior
fn default() -> PropagationBehavior
Returns the “default value” for a type. Read more
impl Eq for PropagationBehavior
Source§impl PartialEq for PropagationBehavior
impl PartialEq for PropagationBehavior
impl StructuralPartialEq for PropagationBehavior
Auto Trait Implementations§
impl Freeze for PropagationBehavior
impl RefUnwindSafe for PropagationBehavior
impl Send for PropagationBehavior
impl Sync for PropagationBehavior
impl Unpin for PropagationBehavior
impl UnsafeUnpin for PropagationBehavior
impl UnwindSafe for PropagationBehavior
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<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