Struct sgx_tstd::sync::SgxReentrantMutexGuard [−][src]
#[must_use]pub struct SgxReentrantMutexGuard<'a, T: 'a> { /* fields omitted */ }
An RAII implementation of a "scoped lock" of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
The data protected by the mutex can be accessed through this guard via its Deref implementation.
Mutability
Unlike MutexGuard
, ReentrantMutexGuard
does not implement DerefMut
,
because implementation of the trait would violate Rust’s reference aliasing
rules. Use interior mutability (usually RefCell
) in order to mutate the
guarded data.
Trait Implementations
impl<'a, T> !Send for SgxReentrantMutexGuard<'a, T>
[src]
impl<'a, T> !Send for SgxReentrantMutexGuard<'a, T>
impl<'mutex, T> Deref for SgxReentrantMutexGuard<'mutex, T>
[src]
impl<'mutex, T> Deref for SgxReentrantMutexGuard<'mutex, T>
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
fn deref(&self) -> &T
Dereferences the value.
impl<'a, T> Drop for SgxReentrantMutexGuard<'a, T>
[src]
impl<'a, T> Drop for SgxReentrantMutexGuard<'a, T>
Auto Trait Implementations
impl<'a, T> Sync for SgxReentrantMutexGuard<'a, T> where
T: Send,
impl<'a, T> Sync for SgxReentrantMutexGuard<'a, T> where
T: Send,