pub struct WeakRef<'scope, T: ?Sized> { /* private fields */ }Expand description
A weak reference obtained from a Scope.
A weak reference cannot be dereferenced directly, but must first be upgraded
to a StrongRef with WeakRef::upgrade().
Note, that the lifetime parameter 'scope of a WeakRef<'scope, T> is
that of the associated Scope<T>, not whatever &T that the
Scope<T> happens to be assigned.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'scope, T> Freeze for WeakRef<'scope, T>where
T: ?Sized,
impl<'scope, T> RefUnwindSafe for WeakRef<'scope, T>where
T: ?Sized,
impl<'scope, T> Send for WeakRef<'scope, T>
impl<'scope, T> Sync for WeakRef<'scope, T>
impl<'scope, T> Unpin for WeakRef<'scope, T>where
T: ?Sized,
impl<'scope, T> UnsafeUnpin for WeakRef<'scope, T>where
T: ?Sized,
impl<'scope, T> UnwindSafe for WeakRef<'scope, T>where
T: ?Sized,
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