pub struct WeakRef<T: ?Sized> { /* private fields */ }Expand description
A weak reference to something a server owns, see Ref::downgrade, which keeps
nothing of it alive and can therefore be kept anywhere, a thread of its own in
particular. What it upgrades into is a Ref borrowed from it, so that it is only held
for as long as it is used.
It is tied to that very thing: a device removed, or replaced by a restart under the same name, no longer upgrades, which is what tells a thread it started to stop.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for WeakRef<T>
impl<T> RefUnwindSafe for WeakRef<T>
impl<T> Send for WeakRef<T>
impl<T> Sync for WeakRef<T>
impl<T> Unpin for WeakRef<T>
impl<T> UnsafeUnpin for WeakRef<T>
impl<T> UnwindSafe for WeakRef<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