pub struct TypeDataRefMut<'a, T: 'static> { /* private fields */ }Expand description
Write guard for type data access, using mapped guard for zero-cost deref.
Implementations§
Source§impl<'a, T: Any + 'static> TypeDataRefMut<'a, T>
impl<'a, T: Any + 'static> TypeDataRefMut<'a, T>
Sourcepub fn try_new(
guard: PyRwLockWriteGuard<'a, Option<TypeDataSlot>>,
) -> Option<Self>
pub fn try_new( guard: PyRwLockWriteGuard<'a, Option<TypeDataSlot>>, ) -> Option<Self>
Try to create a TypeDataRefMut from a write guard. Returns None if the slot is empty or contains a different type.
Trait Implementations§
Source§impl<T: Any + 'static> Deref for TypeDataRefMut<'_, T>
impl<T: Any + 'static> Deref for TypeDataRefMut<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for TypeDataRefMut<'a, T>
impl<'a, T> !RefUnwindSafe for TypeDataRefMut<'a, T>
impl<'a, T> !Send for TypeDataRefMut<'a, T>
impl<'a, T> Sync for TypeDataRefMut<'a, T>where
T: Sync,
impl<'a, T> Unpin for TypeDataRefMut<'a, T>
impl<'a, T> UnsafeUnpin for TypeDataRefMut<'a, T>
impl<'a, T> !UnwindSafe for TypeDataRefMut<'a, 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