Struct riot_wrappers::mutex::MutexGuard
source · pub struct MutexGuard<'a, T> { /* private fields */ }
Expand description
A lock on a mutex
Though a MutexGuard, a mutex’s inner value can be mutably accessed; the creation mechanism of the locks ensures that only one MutexGuard is ever available for any given Mutex.
When the lock is dropped, the mutex becomes available again.
Implementations§
source§impl<'a, T> MutexGuard<'a, T>
impl<'a, T> MutexGuard<'a, T>
sourcepub fn unlock_and_sleep(self)
pub fn unlock_and_sleep(self)
Put the current thread to sleep right after unlocking the mutex. This is equivalent to calling mutex_unlock_and_sleep in RIOT.
Trait Implementations§
source§impl<'a, T> Deref for MutexGuard<'a, T>
impl<'a, T> Deref for MutexGuard<'a, T>
source§impl<'a, T> DerefMut for MutexGuard<'a, T>
impl<'a, T> DerefMut for MutexGuard<'a, T>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for MutexGuard<'a, T>
impl<'a, T> Send for MutexGuard<'a, T>where T: Send,
impl<'a, T> Sync for MutexGuard<'a, T>where T: Send,
impl<'a, T> Unpin for MutexGuard<'a, T>
impl<'a, T> !UnwindSafe for MutexGuard<'a, 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