Struct sync_block::Block
source · pub struct Block {}
Expand description
A synchronisation flavour that blocks the current thread while waiting for the lock to become available.
Trait Implementations§
source§impl MutexFlavor for Block
impl MutexFlavor for Block
source§fn try_lock<'a, T>(
mutex: &'a Mutex<T>,
data: &'a Self::LockData
) -> Option<(MutexGuard<'a, T>, Self::Guard)>where
T: ?Sized,
fn try_lock<'a, T>( mutex: &'a Mutex<T>, data: &'a Self::LockData ) -> Option<(MutexGuard<'a, T>, Self::Guard)>where T: ?Sized,
Tries to acquire the given mutex.
source§fn lock<'a, T>(
mutex: &'a Mutex<T>,
data: &'a Self::LockData
) -> (MutexGuard<'a, T>, Self::Guard)where
T: ?Sized,
fn lock<'a, T>( mutex: &'a Mutex<T>, data: &'a Self::LockData ) -> (MutexGuard<'a, T>, Self::Guard)where T: ?Sized,
Acquires the given mutex.
source§fn post_unlock(data: &Self::LockData)
fn post_unlock(data: &Self::LockData)
Performs any necessary actions after unlocking the mutex.
source§impl Ord for Block
impl Ord for Block
source§impl PartialEq<Block> for Block
impl PartialEq<Block> for Block
source§impl PartialOrd<Block> for Block
impl PartialOrd<Block> for Block
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl RwLockFlavor for Block
impl RwLockFlavor for Block
source§fn try_read<'a, T>(
rw_lock: &'a RwLock<T>,
_: &'a Self::LockData
) -> Option<(RwLockReadGuard<'a, T>, Self::Guard)>where
T: ?Sized,
fn try_read<'a, T>( rw_lock: &'a RwLock<T>, _: &'a Self::LockData ) -> Option<(RwLockReadGuard<'a, T>, Self::Guard)>where T: ?Sized,
Attempts to acquire the given lock with shared access.
source§fn try_write<'a, T>(
rw_lock: &'a RwLock<T>,
_: &'a Self::LockData
) -> Option<(RwLockWriteGuard<'a, T>, Self::Guard)>where
T: ?Sized,
fn try_write<'a, T>( rw_lock: &'a RwLock<T>, _: &'a Self::LockData ) -> Option<(RwLockWriteGuard<'a, T>, Self::Guard)>where T: ?Sized,
Attempts to acquire the given lock with exclusive access.
source§fn read<'a, T>(
rw_lock: &'a RwLock<T>,
data: &'a Self::LockData
) -> (RwLockReadGuard<'a, T>, Self::Guard)where
T: ?Sized,
fn read<'a, T>( rw_lock: &'a RwLock<T>, data: &'a Self::LockData ) -> (RwLockReadGuard<'a, T>, Self::Guard)where T: ?Sized,
Acquires the given lock with shared access.
source§fn write<'a, T>(
rw_lock: &'a RwLock<T>,
data: &'a Self::LockData
) -> (RwLockWriteGuard<'a, T>, Self::Guard)where
T: ?Sized,
fn write<'a, T>( rw_lock: &'a RwLock<T>, data: &'a Self::LockData ) -> (RwLockWriteGuard<'a, T>, Self::Guard)where T: ?Sized,
Acquires the given lock with exclusive access.
source§fn post_unlock(data: &Self::LockData, is_writer_or_last_reader: bool)
fn post_unlock(data: &Self::LockData, is_writer_or_last_reader: bool)
Performs any necessary actions after unlocking the lock.
impl Copy for Block
impl Eq for Block
impl StructuralEq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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