#[repr(transparent)]pub struct WeakId<T: ?Sized> { /* private fields */ }
Expand description
A pointer type for a weak reference to an Objective-C reference counted object.
Allows breaking reference cycles and safely checking whether the object has been deallocated.
Implementations§
Trait Implementations§
source§impl<T: Message> Default for WeakId<T>
impl<T: Message> Default for WeakId<T>
source§fn default() -> Self
fn default() -> Self
Constructs a new WeakId<T>
that doesn’t reference any object.
Calling Self::load
on the return value always gives None
.
impl<T: RefUnwindSafe + ?Sized> RefUnwindSafe for WeakId<T>
impl<T: Sync + Send + ?Sized> Send for WeakId<T>
This implementation follows the same reasoning as Id<T, Shared>
.
impl<T: Sync + Send + ?Sized> Sync for WeakId<T>
This implementation follows the same reasoning as Id<T, Shared>
.
impl<T: ?Sized> Unpin for WeakId<T>
impl<T: RefUnwindSafe + ?Sized> UnwindSafe for WeakId<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