Enum rustpython_common::borrow::BorrowedValue
source · pub enum BorrowedValue<'a, T: ?Sized> {
Ref(&'a T),
MuLock(PyMutexGuard<'a, T>),
MappedMuLock(PyImmutableMappedMutexGuard<'a, T>),
ReadLock(PyRwLockReadGuard<'a, T>),
MappedReadLock(PyMappedRwLockReadGuard<'a, T>),
}
Variants§
Ref(&'a T)
MuLock(PyMutexGuard<'a, T>)
MappedMuLock(PyImmutableMappedMutexGuard<'a, T>)
ReadLock(PyRwLockReadGuard<'a, T>)
MappedReadLock(PyMappedRwLockReadGuard<'a, T>)
Implementations§
Trait Implementations§
source§impl<T: ?Sized> Deref for BorrowedValue<'_, T>
impl<T: ?Sized> Deref for BorrowedValue<'_, T>
source§impl Display for BorrowedValue<'_, str>
impl Display for BorrowedValue<'_, str>
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.
source§impl<'a, T: ?Sized> From<MappedRwLockReadGuard<'a, RawCellRwLock, T>> for BorrowedValue<'a, T>
impl<'a, T: ?Sized> From<MappedRwLockReadGuard<'a, RawCellRwLock, T>> for BorrowedValue<'a, T>
source§fn from(t: PyMappedRwLockReadGuard<'a, T>) -> Self
fn from(t: PyMappedRwLockReadGuard<'a, T>) -> Self
Converts to this type from the input type.
source§impl<'a, T: ?Sized> From<MutexGuard<'a, RawCellMutex, T>> for BorrowedValue<'a, T>
impl<'a, T: ?Sized> From<MutexGuard<'a, RawCellMutex, T>> for BorrowedValue<'a, T>
source§fn from(t: PyMutexGuard<'a, T>) -> Self
fn from(t: PyMutexGuard<'a, T>) -> Self
Converts to this type from the input type.
source§impl<'a, T: ?Sized> From<RwLockReadGuard<'a, RawCellRwLock, T>> for BorrowedValue<'a, T>
impl<'a, T: ?Sized> From<RwLockReadGuard<'a, RawCellRwLock, T>> for BorrowedValue<'a, T>
source§fn from(t: PyRwLockReadGuard<'a, T>) -> Self
fn from(t: PyRwLockReadGuard<'a, T>) -> Self
Converts to this type from the input type.