pub struct SendWeakRef<T: ObjectType>(/* private fields */);
Expand description
A weak reference to the object it was created for that can be sent to
different threads even for object types that don’t implement Send
.
Trying to upgrade the weak reference from another thread than the one where it was created on will panic but dropping or cloning can be done safely from any thread.
Implementations§
source§impl<T: ObjectType> SendWeakRef<T>
impl<T: ObjectType> SendWeakRef<T>
pub fn new() -> SendWeakRef<T>
pub fn into_weak_ref(self) -> WeakRef<T>
Trait Implementations§
source§impl<T: ObjectType> Clone for SendWeakRef<T>
impl<T: ObjectType> Clone for SendWeakRef<T>
source§impl<T: Debug + ObjectType> Debug for SendWeakRef<T>
impl<T: Debug + ObjectType> Debug for SendWeakRef<T>
source§impl<T: ObjectType> Default for SendWeakRef<T>
impl<T: ObjectType> Default for SendWeakRef<T>
source§impl<T: ObjectType> Deref for SendWeakRef<T>
impl<T: ObjectType> Deref for SendWeakRef<T>
source§impl<T: ObjectType> From<WeakRef<T>> for SendWeakRef<T>
impl<T: ObjectType> From<WeakRef<T>> for SendWeakRef<T>
source§fn from(v: WeakRef<T>) -> SendWeakRef<T>
fn from(v: WeakRef<T>) -> SendWeakRef<T>
Converts to this type from the input type.
source§impl<T: IsA<Object>> PropertyGet for SendWeakRef<T>
impl<T: IsA<Object>> PropertyGet for SendWeakRef<T>
source§impl<T: IsA<Object>> PropertySet for SendWeakRef<T>
impl<T: IsA<Object>> PropertySet for SendWeakRef<T>
impl<T: ObjectType> Send for SendWeakRef<T>
impl<T: ObjectType> Sync for SendWeakRef<T>
Auto Trait Implementations§
impl<T> Freeze for SendWeakRef<T>
impl<T> RefUnwindSafe for SendWeakRef<T>where
T: RefUnwindSafe,
impl<T> Unpin for SendWeakRef<T>
impl<T> UnwindSafe for SendWeakRef<T>where
T: RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)