pub struct DoubleCheckedLockReadyBuilder<L, T> { /* private fields */ }Expand description
Convenience builder state with tester attached.
Implementations§
Source§impl<L, T> DoubleCheckedLockReadyBuilder<L, T>where
L: Lock<T>,
impl<L, T> DoubleCheckedLockReadyBuilder<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
Configures logging when the double-checked condition is not met.
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
Configures logging when the prepare action fails.
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
Configures logging when the prepare commit action fails.
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
Configures logging when the prepare rollback action fails.
Sourcepub fn rollback_prepare<Rn, E>(self, rollback_prepare_action: Rn) -> Self
pub fn rollback_prepare<Rn, E>(self, rollback_prepare_action: Rn) -> Self
Sets the rollback action for prepare.
Sourcepub fn commit_prepare<Rn, E>(self, commit_prepare_action: Rn) -> Self
pub fn commit_prepare<Rn, E>(self, commit_prepare_action: Rn) -> Self
Sets the commit action for prepare.
Sourcepub fn build(self) -> DoubleCheckedLockExecutor<L, T>
pub fn build(self) -> DoubleCheckedLockExecutor<L, T>
Builds a reusable DoubleCheckedLockExecutor.
Sourcepub fn call<C, R, E>(self, task: C) -> ExecutionContext<R, E>
pub fn call<C, R, E>(self, task: C) -> ExecutionContext<R, E>
Runs a callable task with one-shot executor creation.
Sourcepub fn execute<Rn, E>(self, task: Rn) -> ExecutionContext<(), E>
pub fn execute<Rn, E>(self, task: Rn) -> ExecutionContext<(), E>
Runs a runnable task with one-shot executor creation.
Sourcepub fn call_with<C, R, E>(self, task: C) -> ExecutionContext<R, E>
pub fn call_with<C, R, E>(self, task: C) -> ExecutionContext<R, E>
Runs a callable task with mutable protected data.
Sourcepub fn execute_with<Rn, E>(self, task: Rn) -> ExecutionContext<(), E>
pub fn execute_with<Rn, E>(self, task: Rn) -> ExecutionContext<(), E>
Runs a runnable task with mutable protected data.
Trait Implementations§
Source§impl<L: Clone, T: Clone> Clone for DoubleCheckedLockReadyBuilder<L, T>
impl<L: Clone, T: Clone> Clone for DoubleCheckedLockReadyBuilder<L, T>
Source§fn clone(&self) -> DoubleCheckedLockReadyBuilder<L, T>
fn clone(&self) -> DoubleCheckedLockReadyBuilder<L, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<L, T> Freeze for DoubleCheckedLockReadyBuilder<L, T>where
L: Freeze,
impl<L, T> !RefUnwindSafe for DoubleCheckedLockReadyBuilder<L, T>
impl<L, T> Send for DoubleCheckedLockReadyBuilder<L, T>where
L: Send,
impl<L, T> Sync for DoubleCheckedLockReadyBuilder<L, T>where
L: Sync,
impl<L, T> Unpin for DoubleCheckedLockReadyBuilder<L, T>where
L: Unpin,
impl<L, T> UnsafeUnpin for DoubleCheckedLockReadyBuilder<L, T>where
L: UnsafeUnpin,
impl<L, T> !UnwindSafe for DoubleCheckedLockReadyBuilder<L, T>
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