Struct shared_mutex::MappedSharedMutexReadGuard
[−]
[src]
pub struct MappedSharedMutexReadGuard<'mutex, T: ?Sized + 'mutex> { // some fields omitted }
A read guard to a sub-borrow of an original SharedMutexReadGuard.
Unlike SharedMutexReadGuard, it cannot be used to wait on a
Condvar.
Methods
impl<'mutex, T: ?Sized> MappedSharedMutexReadGuard<'mutex, T>[src]
fn map<U, F>(self, action: F) -> MappedSharedMutexReadGuard<'mutex, U> where F: FnOnce(&T) -> &U
Transform this guard into a sub-borrow of the original data.
fn option_map<U, F>(self, action: F) -> Option<MappedSharedMutexReadGuard<'mutex, U>> where F: FnOnce(&T) -> Option<&U>
Conditionally transform this guard into a sub-borrow of the original data.
fn result_map<U, E, F>(self, action: F) -> Result<MappedSharedMutexReadGuard<'mutex, U>, (Self, E)> where F: FnOnce(&T) -> Result<&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 MappedSharedMutexReadGuard<'mutex, T>[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value