Expand description
A weak reference without access to the inner value.
To get immutable/mutable access, you need to use the get_ref/get_refmut functions to create Ref or RefMut references.
If only weak references exist to the inner value, the inner value will be dropped, and can no longer be accessed.
Implementations
👎 Deprecated: Renamed to get_refmut
Renamed to get_refmut
Returns a new RefMut, or panics if this is not possible
Will panic in case a RefMut or Ref is currently held
👎 Deprecated: Renamed to try_get_refmut
Renamed to try_get_refmut
Returns a new RefMut, or panics if this is not possible
Will return an error in case a RefMut or Ref is currently held
Returns a new RefMut, or panics if this is not possible
Will panic in case a RefMut or Ref is currently held
Returns a new RefMut, or panics if this is not possible
Will return an error in case a RefMut or Ref is currently held
Returns a new Ref, or panics if this is not possible
Will panic in case a RefMut is currently held, or there are no more Refs available
Returns a new Ref, or returns an error if there are no such references available
Will return an error in case a RefMut is currently held, or there are no more Refs available
👎 Deprecated: Renamed to get_ref
Renamed to get_ref
Returns a new Ref, or panics if this is not possible
Will panic in case a RefMut is currently held, or there are no more Refs available
👎 Deprecated: Renamed to try_get_ref
Renamed to try_get_ref
Returns a new Ref, or returns an error if there are no such references available
Will return an error in case a RefMut is currently held, or there are no more Refs available
Returns a new Weak reference, or panics if there are no such references available
Returns a new Strong reference, or panics if there are no such references available
Returns a new Weak reference, or returns an error if there are no such references available
Returns a new Strong reference, or returns an error if there are no such references available
Trait Implementations
Auto Trait Implementations
impl<T, M = u32> !RefUnwindSafe for Weak<T, M>
impl<T, M = u32> !UnwindSafe for Weak<T, M>
Blanket Implementations
Mutably borrows from an owned value. Read more