Struct shared_mutex::SharedMutexReadGuard
[−]
[src]
pub struct SharedMutexReadGuard<'mutex, T: ?Sized + 'mutex> { /* fields omitted */ }
A shared read guard on a SharedMutex.
Methods
impl<'mutex, T: ?Sized> SharedMutexReadGuard<'mutex, T>
[src]
fn into_mapped(self) -> MappedSharedMutexReadGuard<'mutex, T>
Turn this guard into a guard which can be mapped to a sub-borrow.
Note that a mapped guard cannot wait on a Condvar
.
fn wait_for_write(
self,
cond: &Condvar
) -> LockResult<SharedMutexWriteGuard<'mutex, T>>
self,
cond: &Condvar
) -> LockResult<SharedMutexWriteGuard<'mutex, T>>
Wait on the given condition variable, and resume with a write lock.
See the documentation for std::sync::Condvar::wait
for more information.
fn wait_for_read(self, cond: &Condvar) -> LockResult<Self>
Wait on the given condition variable, and resume with another read lock.
See the documentation for std::sync::Condvar::wait
for more information.
Trait Implementations
impl<'mutex, T: ?Sized + Send> Send for SharedMutexReadGuard<'mutex, T>
[src]
impl<'mutex, T: ?Sized + Sync> Sync for SharedMutexReadGuard<'mutex, T>
[src]
impl<'mutex, T: ?Sized> Deref for SharedMutexReadGuard<'mutex, T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value