|
|
| Weak () noexcept |
| | Creates an empty Weak pointer.
|
| |
|
| Weak (const Weak &other) noexcept |
| | Copy constructs a Weak pointer, incrementing the weak count.
|
| |
|
| Weak (Weak &&other) noexcept |
| | Move constructs a Weak pointer, taking ownership from other.
|
| |
| auto | clone () const noexcept -> Weak |
| | Creates a new Weak pointer to the same allocation.
|
| |
| auto | upgrade () const -> Option< Rc< T > > |
| | Attempts to upgrade the Weak pointer to an Rc, returning None if the value has been dropped.
|
| |
| auto | strong_count () const -> usize |
| | Returns the number of strong (Rc) pointers to the same allocation.
|
| |
| auto | weak_count () const -> usize |
| | Returns the number of Weak pointers to the same allocation.
|
| |
template<typename T>
class alloc::rc::Weak< T >
A non-owning reference to an Rc-managed allocation that does not prevent deallocation.
- Template Parameters
-
| T | The type of the referenced value. |