Struct rustpython_common::lock::ImmutableMappedMutexGuard
source · 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: ?Sized> RefUnwindSafe for ImmutableMappedMutexGuard<'a, R, T>where R: RefUnwindSafe, T: RefUnwindSafe, <R as RawMutex>::GuardMarker: RefUnwindSafe,
impl<'a, R, T> !Send for ImmutableMappedMutexGuard<'a, R, T>
impl<'a, R, T> !Sync for ImmutableMappedMutexGuard<'a, R, T>
impl<'a, R, T: ?Sized> Unpin for ImmutableMappedMutexGuard<'a, R, T>where <R as RawMutex>::GuardMarker: Unpin,
impl<'a, R, T: ?Sized> UnwindSafe for ImmutableMappedMutexGuard<'a, R, T>where R: RefUnwindSafe, T: RefUnwindSafe, <R as RawMutex>::GuardMarker: UnwindSafe,
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