pub struct MutexBuilder { /* private fields */ }Expand description
Creates a Mutex.
Implementations§
Source§impl MutexBuilder
impl MutexBuilder
pub fn new() -> MutexBuilder
Sourcepub fn clock_type(self, clock_type: ClockType) -> MutexBuilder
pub fn clock_type(self, clock_type: ClockType) -> MutexBuilder
Defines the ClockType which should be used in Mutex::timed_lock().
Sourcepub fn is_interprocess_capable(self, value: bool) -> MutexBuilder
pub fn is_interprocess_capable(self, value: bool) -> MutexBuilder
Can the same mutex be used from multiple processes.
Sourcepub fn mutex_type(self, value: MutexType) -> MutexBuilder
pub fn mutex_type(self, value: MutexType) -> MutexBuilder
MutexType defines the behavior of the mutex.
Sourcepub fn thread_termination_behavior(
self,
value: MutexThreadTerminationBehavior,
) -> MutexBuilder
pub fn thread_termination_behavior( self, value: MutexThreadTerminationBehavior, ) -> MutexBuilder
Defines the MutexThreadTerminationBehavior.
Sourcepub fn create<T>(
self,
t: T,
handle: &MutexHandle<T>,
) -> Result<Mutex<'_, '_, T>, MutexCreationError>where
T: Debug,
pub fn create<T>(
self,
t: T,
handle: &MutexHandle<T>,
) -> Result<Mutex<'_, '_, T>, MutexCreationError>where
T: Debug,
Creates a new mutex with a guarded value.
Trait Implementations§
Source§impl Debug for MutexBuilder
impl Debug for MutexBuilder
Source§impl Default for MutexBuilder
impl Default for MutexBuilder
Source§fn default() -> MutexBuilder
fn default() -> MutexBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MutexBuilder
impl RefUnwindSafe for MutexBuilder
impl Send for MutexBuilder
impl Sync for MutexBuilder
impl Unpin for MutexBuilder
impl UnwindSafe for MutexBuilder
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