pub struct ImmutableMappedMutexGuard<'a, R: RawMutex, T: ?Sized> { /* private fields */ }
Expand description
A mutex guard that has an exclusive lock, but only an immutable reference; useful if you
need to map a mutex guard with a function that returns an &T
. Construct using the
MapImmutable
trait.
Implementations§
Trait Implementations§
Source§impl<'a, T: ?Sized> From<ImmutableMappedMutexGuard<'a, RawCellMutex, T>> for BorrowedValue<'a, T>
impl<'a, T: ?Sized> From<ImmutableMappedMutexGuard<'a, RawCellMutex, T>> for BorrowedValue<'a, T>
Source§fn from(t: PyImmutableMappedMutexGuard<'a, T>) -> Self
fn from(t: PyImmutableMappedMutexGuard<'a, T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, R, T> Freeze for ImmutableMappedMutexGuard<'a, R, T>where
T: ?Sized,
impl<'a, R, T> RefUnwindSafe for ImmutableMappedMutexGuard<'a, R, T>
impl<'a, R, T> !Send for ImmutableMappedMutexGuard<'a, R, T>
impl<'a, R, T> !Sync for ImmutableMappedMutexGuard<'a, R, T>
impl<'a, R, T> Unpin for ImmutableMappedMutexGuard<'a, R, T>
impl<'a, R, T> UnwindSafe for ImmutableMappedMutexGuard<'a, R, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more