pub struct DoubleCheckedLockBuilder<L, T> { /* private fields */ }Expand description
Convenience builder state with lock attached.
Implementations§
Source§impl<L, T> DoubleCheckedLockBuilder<L, T>where
L: Lock<T>,
impl<L, T> DoubleCheckedLockBuilder<L, T>where
L: Lock<T>,
Sourcepub fn log_unmet_condition(
self,
level: Level,
message: impl Into<String>,
) -> Self
pub fn log_unmet_condition( self, level: Level, message: impl Into<String>, ) -> Self
Sourcepub fn disable_unmet_condition_logging(self) -> Self
pub fn disable_unmet_condition_logging(self) -> Self
Disables logging when the double-checked condition is not met.
§Returns
This builder with unmet-condition logging disabled.
Sourcepub fn log_prepare_failure(
self,
level: Level,
message_prefix: impl Into<String>,
) -> Self
pub fn log_prepare_failure( self, level: Level, message_prefix: impl Into<String>, ) -> Self
Sourcepub fn disable_prepare_failure_logging(self) -> Self
pub fn disable_prepare_failure_logging(self) -> Self
Disables logging when the prepare action fails.
§Returns
This builder with prepare failure logging disabled.
Sourcepub fn log_prepare_commit_failure(
self,
level: Level,
message_prefix: impl Into<String>,
) -> Self
pub fn log_prepare_commit_failure( self, level: Level, message_prefix: impl Into<String>, ) -> Self
Sourcepub fn disable_prepare_commit_failure_logging(self) -> Self
pub fn disable_prepare_commit_failure_logging(self) -> Self
Disables logging when the prepare commit action fails.
§Returns
This builder with prepare-commit failure logging disabled.
Sourcepub fn log_prepare_rollback_failure(
self,
level: Level,
message_prefix: impl Into<String>,
) -> Self
pub fn log_prepare_rollback_failure( self, level: Level, message_prefix: impl Into<String>, ) -> Self
Sourcepub fn disable_prepare_rollback_failure_logging(self) -> Self
pub fn disable_prepare_rollback_failure_logging(self) -> Self
Disables logging when the prepare rollback action fails.
§Returns
This builder with prepare-rollback failure logging disabled.
Sourcepub fn catch_panics(self) -> Self
pub fn catch_panics(self) -> Self
Enables panic capture for tester, prepare callbacks, and task execution.
§Returns
This builder with panic capture enabled.
Sourcepub fn with_panic_capture(self, catch_panics: bool) -> Self
pub fn with_panic_capture(self, catch_panics: bool) -> Self
Sourcepub fn disable_catch_panics(self) -> Self
pub fn disable_catch_panics(self) -> Self
Disables panic capture for tester, prepare callbacks, and task execution.
§Returns
This builder with panic capture disabled.
Sourcepub fn when<Tst>(self, tester: Tst) -> DoubleCheckedLockReadyBuilder<L, T>
pub fn when<Tst>(self, tester: Tst) -> DoubleCheckedLockReadyBuilder<L, T>
Trait Implementations§
Auto Trait Implementations§
impl<L, T> Freeze for DoubleCheckedLockBuilder<L, T>where
L: Freeze,
impl<L, T> RefUnwindSafe for DoubleCheckedLockBuilder<L, T>where
L: RefUnwindSafe,
impl<L, T> Send for DoubleCheckedLockBuilder<L, T>where
L: Send,
impl<L, T> Sync for DoubleCheckedLockBuilder<L, T>where
L: Sync,
impl<L, T> Unpin for DoubleCheckedLockBuilder<L, T>where
L: Unpin,
impl<L, T> UnsafeUnpin for DoubleCheckedLockBuilder<L, T>where
L: UnsafeUnpin,
impl<L, T> UnwindSafe for DoubleCheckedLockBuilder<L, T>where
L: UnwindSafe,
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