Struct shared_mutex::monitor::MonitorReadGuard [] [src]

pub struct MonitorReadGuard<'mutex, T: ?Sized + 'mutex> {
    // some fields omitted
}

A shared read guard to the data in a Monitor.

Methods

impl<'mutex, T: ?Sized> MonitorReadGuard<'mutex, T>
[src]

fn wait_for_read(self) -> LockResult<Self>

Wait for a notification on the monitor, then resume with another read guard.

fn wait_for_write(self) -> LockResult<MonitorWriteGuard<'mutex, T>>

Wait for a notification on the monitor, then resume with a write guard.

fn notify_one(&self)

Notify a thread waiting on the monitor.

fn notify_all(&self)

Notify all threads waiting on the monitor.

Methods from Deref<Target=SharedMutexReadGuard<'mutex, T>>

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>>

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> Deref for MonitorReadGuard<'mutex, T>
[src]

type Target = SharedMutexReadGuard<'mutex, T>

The resulting type after dereferencing

fn deref(&self) -> &Self::Target

The method called to dereference a value

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

fn into(self) -> SharedMutexReadGuard<'mutex, T>

Performs the conversion.

impl<'mutex, T: ?Sized + Debug> Debug for MonitorReadGuard<'mutex, T>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.