Struct MappedMutexGuard
struct MappedMutexGuard<'a, T: ?Sized, U: ?Sized> { ... }
An RAII guard returned by the MutexGuard::map and MappedMutexGuard::map methods.
When this structure is dropped (falls out of scope), the lock will be unlocked.
Implementations
impl<'a, T: ?Sized, U: ?Sized> MappedMutexGuard<'a, T, U>
fn map<V: ?Sized, F>(this: Self, f: F) -> MappedMutexGuard<'a, T, V> where F: FnOnce(&mut U) -> &mut VReturns a locked view over a portion of the locked data.
Example
# block_on;
impl<'a, T, U> Freeze for MappedMutexGuard<'a, T, U>
impl<'a, T, U> RefUnwindSafe for MappedMutexGuard<'a, T, U>
impl<'a, T, U> Unpin for MappedMutexGuard<'a, T, U>
impl<'a, T, U> UnsafeUnpin for MappedMutexGuard<'a, T, U>
impl<'a, T, U> UnwindSafe for MappedMutexGuard<'a, T, U>
impl<P, T> Receiver for MappedMutexGuard<'a, T, U>
impl<T> Any for MappedMutexGuard<'a, T, U>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for MappedMutexGuard<'a, T, U>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for MappedMutexGuard<'a, T, U>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for MappedMutexGuard<'a, T, U>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for MappedMutexGuard<'a, T, U>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for MappedMutexGuard<'a, T, U>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for MappedMutexGuard<'a, T, U>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: ?Sized + Send, U: ?Sized + Send> Send for MappedMutexGuard<'_, T, U>
impl<T: ?Sized + Sync, U: ?Sized + Sync> Sync for MappedMutexGuard<'_, T, U>
impl<T: ?Sized, U: ?Sized + fmt::Debug> Debug for MappedMutexGuard<'_, T, U>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T: ?Sized, U: ?Sized> Deref for MappedMutexGuard<'_, T, U>
fn deref(self: &Self) -> &U
impl<T: ?Sized, U: ?Sized> DerefMut for MappedMutexGuard<'_, T, U>
fn deref_mut(self: &mut Self) -> &mut U
impl<T: ?Sized, U: ?Sized> Drop for MappedMutexGuard<'_, T, U>
fn drop(self: &mut Self)