Struct shared_mutex::SharedMutexReadGuard [] [src]

pub struct SharedMutexReadGuard<'mutex, T: ?Sized + 'mutex> {
    // some 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) -> 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) -> 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

impl<'mutex, T: ?Sized> Drop for SharedMutexReadGuard<'mutex, T>
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more