Struct shared_mutex::MappedSharedMutexWriteGuard [] [src]

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

A write guard to a sub-borrow of an original SharedMutexWriteGuard.

Unlike SharedMutexWriteGuard, it cannot be used to wait on a Condvar.

Methods

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

fn map<U, F>(self, action: F) -> MappedSharedMutexWriteGuard<'mutex, U> where F: FnOnce(&mut T) -> &mut U

Transform this guard into a sub-borrow of the original data.

fn option_map<U, F>(self, action: F) -> Option<MappedSharedMutexWriteGuard<'mutex, U>> where F: FnOnce(&mut T) -> Option<&mut U>

Conditionally transform this guard into a sub-borrow of the original data.

fn result_map<U, E, F>(self, action: F) -> Result<MappedSharedMutexWriteGuard<'mutex, U>, (Self, E)> where F: FnOnce(&mut T) -> Result<&mut U, E>

Conditionally transform this guard into a sub-borrow of the original data.

If the transformation operation is aborted, returns the original guard.

Trait Implementations

impl<'mutex, T: ?Sized> Deref for MappedSharedMutexWriteGuard<'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> DerefMut for MappedSharedMutexWriteGuard<'mutex, T>
[src]

fn deref_mut(&mut self) -> &mut T

The method called to mutably dereference a value

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

fn drop(&mut self)

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